home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / tcl / 1885 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.4 KB  |  59 lines

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