|
From: Jeff H. <je...@ac...> - 2006-05-24 03:41:19
|
Bryan Oakley wrote:
> Jeff Hobbs wrote:
>> Bryan Oakley wrote:
>>
>>> I noticed that with tile 0.7.2, if I click on a button the focus is
>>> set to that button. Investigating I see it is due to this:
>>>
>>> % bind TRadiobutton <1>
>>> %W instate !disabled { tile::clickToFocus %W; %W state pressed }
>>>
>>> Is this an intentional deviation from the standard widget behavior?
>>> The normal tk widgets don't get focus when you click on them.
>>
>>
>> But normal Windows widgets do (and likely true for other native widget
>> sets).
>> Themed widgets should first follow platform style, and only 2nd (in
>> lieu of
>> clear platform style) follow traditional Tk style.
>
> I guess I'll take your word for it. Wordpad on my machine, for example,
> doesn't set the focus to a button. I click on the clipboard button on
> the toolbar and the focus is still in the main part of the UI.
>
> On the Mac, run textedit and click on an alignment button on the toolbar
> and the focus stays in the main part of the UI. Likewise with mail.app,
> type in a name and click on the "Save as Draft" button on the toolbar
> and focus seems to stay where it was.
Don't take my word for it, because you are right. I usually go to the
Display Properties on XP for reference. Lacking radiobuttons there, I
went to Firefox - which is itself using an emulated native widget set.
Firefox does set focus on radio click, but you are right that native XP
widgets don't seem to by default. I can't find this behavior on OS X
either, even when fiddling with various focus/keypad handling preferences.
I would argue that this feature should be controlled by some master
switch, off by default (or perhaps only on on unix?).
Jeff
|