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

  1. Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!cac.washington.edu!mattf
  2. From: mattf@cac.washington.edu (Matthew Freedman)
  3. Newsgroups: comp.windows.x.motif
  4. Subject: Re: Setting Color on OptionMenu Button -- Impossible?
  5. Message-ID: <1992Dec21.204341.10740@u.washington.edu>
  6. Date: 21 Dec 92 20:43:41 GMT
  7. References: <1992Dec17.200759.6766@u.washington.edu>
  8. Sender: news@u.washington.edu (USENET News System)
  9. Organization: U.W. Information Systems
  10. Lines: 40
  11.  
  12. In article <1992Dec17.200759.6766@u.washington.edu>, mattf@cac.washington.edu (Matthew Freedman) writes:
  13. > One obvious thing to do is make the push-button on the option menu the
  14. > same color as all the other push-buttons on the application, which is
  15. > different than the default background. However, OSF in its wisdom made
  16. > the pushbutton a gadget, hence it can not have a different color than
  17. > its parent, which in this case is a rowcolumn. If I set the color of
  18. > that rowcolumn so that the button inherits it, I get a strange looking
  19. > colored border around the button (I.e. the portion of the rowcolumn
  20. > not covered by the button).
  21.  
  22. Following up my own post here, I found a way to do it. Basically, you
  23. need to get rid of the XmLabel widget (you can always put a separate
  24. one next to the OptionMenu), and shrink the RowColumn so that it is
  25. exactly the same size as the PushButtonGadget, that way it does not
  26. matter if they are both the same color. The following resource
  27. settings are all necessary to get this to work...
  28.  
  29.   ...XmRowColumn*highlightThickness: 0
  30.   ...XmRowColumn.spacing: 0
  31.   ...XmRowColumn.marginHeight: 0
  32.   ...XmRowColumn.marginWidth: 0
  33.   ...XmRowColumn*XmLabelGadget.marginWidth: 0
  34.  
  35. The text of the label has to be null. Unmanaging the Label causes
  36. havoc though (at least in 1.1.4).
  37.  
  38. This still leaves me with a one pixel wide border of the button on the
  39. left side of the button. But it is pretty unnoticeable.
  40.  
  41. Somebody sent me mail saying that in 1.2 you can simply unmanage the
  42. label, and the row-column will automatically wrap around the button. 
  43.  
  44.        -- Matt
  45.  
  46. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  47. = Matthew M. Freedman                                                 =
  48. = U. of Washington Information Systems       mattf@cac.washington.edu =
  49. = 4545 15th Ave. NE; 4th Floor               (206) 543-5593           =
  50. = Seattle, WA  98105                                                  =
  51. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  52.