f



Ttk first experiences

Hi,

I made the first experiences with Ttk and I'm not that amused.

First my already reported high-contrast/accessiblity issues, which prevent to use some "native" Ttk widgets.

Than the only rudimentary comparable panedwindow widget, missing e.g. the -minsize pane option.

Then I tried to use the -underline otpion for ttk::notebook and ttk::menubutton.

I succeeded to control the notebook tabs, but I can't control the ttk::menubutton's.

As example:

    % ttk::menubutton .mb1 -text "abc" -underline 0 -menu .m1
    .mb1
    % ttk::menubutton .mb2 -text "def" -underline 0 -menue .m2
    .mb2

There is no: ".mb1 invoke", so I needed to do:

    % event generate .mb1 <Button-1>

This worked the first time, but now using ...

    % event generate .mb2 <Button-1>

.... opens still the same further opened button .mb1, instead of .mb2.

Why some widgets have a "-underline" option support, but no build in support for handling the mnemonics?
Why (ttk::)menubuttons do not have an invoke sub command?

At last - the ttk::menubutton do not have the indicator option, but the always reserve some space to the right of the menubutton text?! Why?

Kind regards,

Martin
0
MartinLemburg
12/19/2016 5:49:49 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

1 Replies
312 Views

Similar Articles

[PageSpeed] 41

On Monday, December 19, 2016 at 9:49:57 AM UTC-8, MartinLemburg@Siemens-PLM wrote:
> I made the first experiences with Ttk and I'm not that amused.
> 
> First my already reported high-contrast/accessiblity issues, 

I can only recommend using one of the non-native, non-graphical themes, then you can change the field backgrounds, etc.

> [...continued] which prevent to use succeeded to control the notebook tabs, but I can't control the ttk::menubutton's.
> 
> As example:
> 
>     % ttk::menubutton .mb1 -text "abc" -underline 0 -menu .m1
>     .mb1
>     % ttk::menubutton .mb2 -text "def" -underline 0 -menue .m2
>     .mb2
> 
> There is no: ".mb1 invoke", so I needed to do:
> 
>     % event generate .mb1 <Button-1>
> 

For menus, you will want to do:
   event generate .mb1 <Button-Release-1>

> Why some widgets have a "-underline" option support, but no build in support for handling the mnemonics?

Generally, it gives the developer more flexibility.  Also the meta key is different on different operating systems.  There was a discussion about this recently -- can't remember where, and unfortunately I don't recall the resolution.
0
Brad
12/19/2016 6:24:53 PM
Reply: