• Style of menu

    From meshparts@[email protected] to comp.lang.tcl on Sun Mar 8 08:39:23 2026
    From Newsgroup: comp.lang.tcl

    Why is it that changing the style of a menu widget by

    ttk::style configure Menu -bg $bg

    has no effect on the color of a menu widget,

    but the next line does?

    menu .popupmenu -bg $bg
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From saito@[email protected] to comp.lang.tcl on Sun Mar 8 06:48:56 2026
    From Newsgroup: comp.lang.tcl

    On 3/8/2026 3:39 AM, meshparts wrote:
    Why is it that changing the style of a menu widget by

    ttk::style configure Menu -bg $bg

    has no effect on the color of a menu widget,

    but the next line does?

    menu .popupmenu -bg $bg

    I believe you need to work with styles to customize ttk widgets.
    I am not very familiar with styles so you will hav eto searhc the wiki
    for more info. But hopefully this gives you a start.

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From meshparts@[email protected] to comp.lang.tcl on Sun Mar 8 12:51:12 2026
    From Newsgroup: comp.lang.tcl

    Am 08.03.2026 um 11:48 schrieb saito:
    I believe you need to work with styles to customize ttk widgets.
    This is exactly what the first line of code should do. Changing the
    default style.

    I work with styles all over the place. Only the menu does not change accordingly.



    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From undroidwish@[email protected] to comp.lang.tcl on Sun Mar 8 17:37:07 2026
    From Newsgroup: comp.lang.tcl

    On 3/8/26 12:51, meshparts wrote:

    ...
    I work with styles all over the place. Only the menu does not change accordingly.

    By design, BTW. Menus aren't ttk but old school widgets. Read the fine
    manual to see what options are available.

    HTH,
    Christian
    --- Synchronet 3.21d-Linux NewsLink 1.2