home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!ucbvax!osf.org!al
- From: al@osf.org
- Newsgroups: comp.windows.x.motif
- Subject: Re: How to simulate a ToggleButton with a PushButton
- Message-ID: <9212202139.AA17543@postman.osf.org>
- Date: 20 Dec 92 21:39:30 GMT
- Sender: usenet@ucbvax.BERKELEY.EDU
- Distribution: inet
- Organization: The Internet
- Lines: 18
-
-
- > Use a ToggleButton, and set the following resources:
- > XmNindicatorOn, False
- > XmNshadowThickness, 1,
-
- This is a good way to achieve the toggle button visual and...
-
- > The only other thing left to do, since a ToggleButton doesn't have a
- > XmNarmColor resource like a PushButton, is to change the ToggleButton's
- > background resource in the ToggleButton's XmNarmCallback when it gets pressed.
-
- ..in Motif 1.2 or later, set the resource XmNfillOnSelect to true, and the background
- of a 'set' toggle button will be filled with XmNselectColor.
-
- For an example see the Motif Periodic demo, in demos/periodic/*
-
- Alastair Gourlay.
-
-