home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / motif / 8221 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  978 b 

  1. Path: sparky!uunet!spool.mu.edu!agate!ucbvax!osf.org!al
  2. From: al@osf.org
  3. Newsgroups: comp.windows.x.motif
  4. Subject: Re: How to simulate a ToggleButton with a PushButton
  5. Message-ID: <9212202139.AA17543@postman.osf.org>
  6. Date: 20 Dec 92 21:39:30 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Distribution: inet
  9. Organization: The Internet
  10. Lines: 18
  11.  
  12.  
  13. > Use a ToggleButton, and set the following resources:
  14. >      XmNindicatorOn, False
  15. >      XmNshadowThickness, 1,
  16.  
  17. This is a good way to achieve the toggle button visual and...
  18.  
  19. > The only other thing left to do, since a ToggleButton doesn't have a
  20. > XmNarmColor resource like a PushButton, is to change the ToggleButton's
  21. > background resource in the ToggleButton's XmNarmCallback when it gets  pressed.
  22.  
  23. ..in Motif 1.2 or later, set the resource XmNfillOnSelect to true, and the background
  24. of a 'set' toggle button will be filled with XmNselectColor.
  25.  
  26. For an example see the Motif Periodic demo, in demos/periodic/*
  27.  
  28. Alastair Gourlay.
  29.  
  30.