home *** CD-ROM | disk | FTP | other *** search
- 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
- From: mattf@cac.washington.edu (Matthew Freedman)
- Newsgroups: comp.windows.x.motif
- Subject: Re: Setting Color on OptionMenu Button -- Impossible?
- Message-ID: <1992Dec21.204341.10740@u.washington.edu>
- Date: 21 Dec 92 20:43:41 GMT
- References: <1992Dec17.200759.6766@u.washington.edu>
- Sender: news@u.washington.edu (USENET News System)
- Organization: U.W. Information Systems
- Lines: 40
-
- In article <1992Dec17.200759.6766@u.washington.edu>, mattf@cac.washington.edu (Matthew Freedman) writes:
- > One obvious thing to do is make the push-button on the option menu the
- > same color as all the other push-buttons on the application, which is
- > different than the default background. However, OSF in its wisdom made
- > the pushbutton a gadget, hence it can not have a different color than
- > its parent, which in this case is a rowcolumn. If I set the color of
- > that rowcolumn so that the button inherits it, I get a strange looking
- > colored border around the button (I.e. the portion of the rowcolumn
- > not covered by the button).
-
- Following up my own post here, I found a way to do it. Basically, you
- need to get rid of the XmLabel widget (you can always put a separate
- one next to the OptionMenu), and shrink the RowColumn so that it is
- exactly the same size as the PushButtonGadget, that way it does not
- matter if they are both the same color. The following resource
- settings are all necessary to get this to work...
-
- ...XmRowColumn*highlightThickness: 0
- ...XmRowColumn.spacing: 0
- ...XmRowColumn.marginHeight: 0
- ...XmRowColumn.marginWidth: 0
- ...XmRowColumn*XmLabelGadget.marginWidth: 0
-
- The text of the label has to be null. Unmanaging the Label causes
- havoc though (at least in 1.1.4).
-
- This still leaves me with a one pixel wide border of the button on the
- left side of the button. But it is pretty unnoticeable.
-
- Somebody sent me mail saying that in 1.2 you can simply unmanage the
- label, and the row-column will automatically wrap around the button.
-
- -- Matt
-
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- = Matthew M. Freedman =
- = U. of Washington Information Systems mattf@cac.washington.edu =
- = 4545 15th Ave. NE; 4th Floor (206) 543-5593 =
- = Seattle, WA 98105 =
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-