home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / x / motif / 7546 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.8 KB

  1. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!darwin.sura.net!Sirius.dfn.de!chx400!decus!u_bornetun
  2. From: u_bornetun@decus.ch
  3. Newsgroups: comp.windows.x.motif
  4. Subject: Re: Query about the Command widget
  5. Message-ID: <2375.2b0a092a@decus.ch>
  6. Date: 18 Nov 92 09:13:14 CET
  7. References: <1992Nov17.042003.26005@ccu1.aukuni.ac.nz>
  8. Organization: DECUS (Switzerland)
  9. Lines: 31
  10.  
  11. In article <1992Nov17.042003.26005@ccu1.aukuni.ac.nz>, sands@ccu1.aukuni.ac.nz (Greg Sands) writes:
  12. > I have a small problem with the XmCommand widget that I cannot see how to fix.
  13. > The difficulties occur when a previous item in the list has been selected and
  14. > executed.  I can now deselect that item OK, but what I want is that when I next
  15. > press the up-arrow key, the selected item will be the last one in the list. 
  16. > Instead, it the one immediately before the one previously selected, as if the
  17. > item had not been deselected at all.  It seems as though the 
  18. > SelectionBoxUpOrDown action routine may be the one to look at, but how would
  19. > I modify it to do what I want?  Basically it would be sufficient to over-ride
  20. > the first arrow-key press, and force it to select the bottom item.
  21. > Thanks for any help you can give with this.
  22. > Greg.
  23. > -- 
  24. > Greg Sands.                           |  Department of Engineering Science
  25. > -----------                           |  University of Auckland           
  26. > g.sands@aukuni.ac.nz                  |  New Zealand.
  27.  
  28.  
  29. I had the same problem, and gave up trying to solve it the "proper" way. 
  30. I used a collection of widgets to implement the same functionality. You just
  31. need a scrolled list with the commands and an XmTextField to type in.
  32. Managing the list is easy, and you need event handlers on the text field
  33. for arrow up and down. Use activate callback on the text field to get the 
  34. command.
  35.  
  36.  
  37. Ulrika
  38.