How can I configure my XmToggleButton to resemble a PushButton widget
that appears to push in and out to represent on and off settings?
      | 
     
     11-Jul-02 09:00 GMT
      |  
 
This can be very easily achieved by setting a few resources on the
XmToggleButton widget. The resources and the required settings are as follows:
- XmNshadowThickness should be set to 2
 - This draws a border around the button
  - XmNmarginLeft should be set to 0
 - This removes the space which was occupied
by the indicator 
  - XmNindicatorOn should be set to XmINDICATOR_NONE
 - This suppresses the small square indicator
  
A code example to set these resources on an XmToggleButton called "toggle1"
might read as follows:
XtVaSetValues ( toggle1, XmNshadowThickness, 2,
			 XmNmarginLeft, 0,
			 XmNindicatorOn, XmINDICATOR_NONE,
			 NULL );
 
 
   
   
Sponsored
by X-Designer - The Leading X/Motif GUI Builder
- Click to download a FREE evaluation
 
 
 
Goto top of page
     |