|
From: Jeff H. <je...@ac...> - 2006-05-24 16:31:43
|
Joe English 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.
>
> 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.
The Windows one is a little different, in that you don't see the focus ring
until you actually attempt to use keyboard traversal, although it does appear
to set focus to that widget.
> 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).
Shouldn't this be controllable without removing takefocus on the widget
totally?
Jeff
|