motifdeveloper.com
Sponsored by IST Limited
Formerly MW3: Motif on the World Wide Web [MW3 Logo]
Last Updated
November 18, 2002
 


X-Designer - The Leading X/Motif GUI Builder - Click to download a FREE evaluation
 

motifdeveloper.com
Home
About the site
Bulletin Board
News Archive
OpenGroup News
Events
Search
Frequently Asked Questions
The Motif FAQ
X/Motif FAQs
General FAQs
Ask Antony
Latest Q & A
All Q & As
Submit Question
Tips & Pointers
Code Examples
Software
OpenMotif
Widget Sets
GUI Toolkits & Libraries
Motif suppliers
Non-commercial S/W
Commercial Software
Multimedia
Miscellaneous
Organizations
Docs & Pubs
X/Motif Newsgroups
Security
Internationalization
Feedback
Feedback Form
Contributors
 

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

 

[IST Limited]
IST Limited is the
proud sponsor of motifdeveloper.com.
 

Thanks to all the contributors to these pages.

Privacy Policy

 
"Motif" is a registered trademark of The Open Group. All other trademarks are the property of their respective owners.

Some articles/papers here have their own copyright notice. All other information is copyright ©1999-2008 IST Limited

[CommerceOne] MW3 site originally by Ken Sall of Commerce One (formerly Century Computing).