|
From: Brian G. <bgr...@mo...> - 2006-05-24 15:40:32
|
Bryan Oakley wrote:
> Joe English wrote:
>> [ Just catching up with the discussion ... ]
>>
>> 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.
>>
>>
>> Yes, that's intentional; and thanks for bringing this up --
>>
>> I checked the other major toolkits to see which ones use click-to-focus:
>> Gtk, Windows, Motif, Mozilla, and OpenOffice all set focus-on-click
>> for radio-, check-, and push-buttons; whereas Tk, Qt, and the Mac do
>> not.
>> Tile buttons set focus-on-click by default, though this can be
>> disabled by setting '-takefocus 0' on the widget (see tile::clickToFocus
>> and tile::wantsFocus in library/utils.tcl).
>
> Setting -takefocus to zero is definitely not the right solution. We
> don't want to completely remove the ability to traverse the widgets
> with the keyboard, which is what -takefocus 0 does. I just don't want
> a click on a radiobutton, checkbutton or tool button on my toolbar to
> steal focus away from the main data entry area of my application.
Huh? You don't want keyboard traversal for a radio button in a toolbar
on the main window, and that's what -takefocus 0 gives you. So what's
the problem?
-Brian
|