[comp.windows.x.motif] xmToggleButtons, xmPushButtons, and pixmaps

rtidd@MWUNIX.MITRE.ORG (Randall Tidd) (07/13/90)

I have a bunch of ToggleButtonGadgets with pixmaps on them, and no
indicators (XmNindicatorOn = False).  They are in a RowColumn with 
radioBehavior set to True.  When a user arms one of the ToggleButtonGadgets,
I want the shadow border around it to "push in", just like when you
push a PushButton.  The difference is that the ToggleButtonGadget will
stay activated after the user lets go of the mouse, so the Button should
still appear to be "pushed in".  Another click on the Button should
"pop out" the button.

The problem is that without indicators, the TBG's don't have any shadow
borders.  I could switch to PushButtons, but I see 2 problems with this:

	- I will have to do my own Radio Behavior, because the RowCol
	  only does radioBehavior with ToggleButton[Gadget]s.  Not
	  impossible, but it could get hairy since i'm allowing the
	  user to add/remove buttons (cut/paste).

	- I want the button to say active after the user lets go of the
	  mouse, and I can't get a PushButton to do this.

What is a solution? I've seen it done with simple bit maps, and I guess
a hack would be to produce the shadow effects by making the edges of your
pixmap the right colors.  But i'm working with 8-bit images, and modifying
the pixmap to work in this manner wouldn't be easy at all.

Help?

                                                 GOOD
Randy Tidd                                       FAST
rtidd@mwunix.mitre.org                           CHEAP
#define DISCLAIM TRUE                               - Pick any two