Submitted by Anonymous on Wed, 04/18/2001 - 09:43. Developers
Hi,
When I activate a push button I want the button stay armed until I activate it again. I dont`t know if there is some method to do this, or I have to change the shadows; in this case, I don`t how can I do it.
Thank you for your help.
Try this
void flipEtched(Widget pushB)
{
Pixel color1, color2;
XtVaGetValues(pushB, XmNtopShadowColor, &color1,
XmNbottomShadowColor, &color2, NULL);
XtVaSetValues(pushB, XmNtopShadowColor, color2,
XmNbottomShadowColor, color1, NULL);
}
Thank you dpeterc, it just works as I want.
Isn`t this a toggle button?
The comp.windows.x.motif FAQ has information on how to use a toggle as a push-button, with similar visuals.