|
From: Bryan O. <oa...@ba...> - 2006-05-24 11:56:10
|
Brian Griffin wrote:
> Jeff Hobbs wrote:
>>
>> I think you are arguing a slightly orthogonal point. Bryan noted that
>> the buttons receive focus when you click on them - not that they can
>> possibly receive focus at all (like via the Tab key). I'm not
>> advocating removing the ability to receive focus, just that clicking
>> on them doesn't automatically add focus (thus negating the current
>> "clickToFocus" behavior). This should not alter keyboard traversal
>> behavior.
>
>
> I'm not so sure they are completely orthogonal. When using a mix of
> mouse and keyboard, it seems reasonable that the last mouse click sets
> the starting point of the next key stroke, whether it's an invoke or
> Tab-Next key, especially in dialog boxes.
I'll agree with Jeff. No, Brian. No, Jeff!
I think there's no universal truth for when clicking on a button moves
focus there, though I think way more often than not we do _not_ want
focus to go to a button when it is clicked.
Dialogs are a likely exception, though I'm not sure I can think of any
other exceptions.
The other point is, it's much easier for a programmer to add
click-to-focus than it is to remove it. To add it I just do "bind
.whatever <1> {focus %W}". If focus is set automatically by the class
bindings I either have to replace the class bindings (something I'm
generally loathe to do), or do something gross like "bind .whatever
<ButtonPress-1> {rememberFocus}; bind .whatever <ButtonRelease-1>
{restoreFocus}"
I vote for removing the default click-to-focus of buttons and letting
the programmer easily choose when they want a button to have focus.
|