home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!eco.twg.com!twg.com!news
- From: "David Herron" <david@twg.com>
- Subject: Re: Can <Tab> be used to change focus in forms?
- Message-ID: <1992Nov18.174924.7487@twg.com>
- Sensitivity: Personal
- Encoding: 39 TEXT , 4 TEXT
- Sender: news@twg.com (USENET News System)
- Conversion: Prohibited
- Organization: The Wollongong Group, Inc., Palo Alto, CA
- Conversion-With-Loss: Prohibited
- Date: Wed, 18 Nov 1992 17:53:39 GMT
- Lines: 44
-
- shite@sinkhole.unf.edu (Stephen Hite) writes:
- > When creating a dialog using the Tk Toolkit (with wish), is
- >it easy to get the <Tab> key to act as a focus changer so a user
- >could easily go from one field to the next without using the
- >mouse? That is, I'm looking for the functionality you'd get in a dialog
- >with Microsoft Windows.
-
- Not without a lot of work. I've done it, and the code is in an
- easily separable module, so it can (and has been in the past) sent
- out for distribution.
-
- It works by declaring some places on the screen which can have focus.
- The focus module keeps a list of places which can have focus and sets
- up bindings so that <TAB> traverses them in a grand circle. You can also
- arrange for particular events to focus-traverse in other ways. Focus is
- indicated by modifying the relief of the frame widget enclosing the area
- which can have focus, the frames are declared to have width=3 so that
- the relief actually SHOWS UP.
-
- I'm not satisfied with it
-
- - It is possible to be indicating focus on a widget which does not
- have focus.
-
- - It works differently than the MS-Windows & Motif way. On those two
- the user is supposed to be able to reach and manipulate any widget
- using just the keyboard. With my focus module you can only REACH
- widgets which have been declared to the focus module, and you can
- only MANIPULATE them in ways which are declared in Tk's bindings.
-
- For instance, Motif listboxes can be scrolled with the arrow keys
- and (by default) Tk's listboxes cannot. It is possible to set focus
- on a listbox and have the arrow (and PgUp & PgDn) keys scroll
- it around. But it is not this way by default.
-
- If you want it posted, send mail to me at home (David Herron
- <david@davids.mmdf.com>) and I'll arrange to post it again or
- maybe hand it to the archiver.
-
-
- <- David Herron <david@twg.com> (work) <david@davids.mmdf.com> (home)
- <-
- <- During the '80s Usenet's mantra was: "Not all the world's a VAX".
- <- During the '90s I hope it becomes: "Not all the world's DOS (ick)".
-