How can I make objects unvisible

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
How can I make objects unvisible

Submitted by Anonymous on Tue, 06/25/2002 - 16:18. Developers
If I want to make some widgets unvisible such as labels and buttons,how can I do?
What resource should I use?

Anonymous

I have been using XtUnmanageChild(), passing it the name of the object that I / you wish to hide.

Example
Widget o_MyObject;
XtUnmanageChild(o_MyObject);

To make it visible again I use XtManageChild().
Example
Widget o_MyObject;
XtManageChild(o_MyObject);

Be careful not to manage an object more than once. This can result in some weird behavior sometimes.

ICS_support

Unmanaging is what you the original poster is looking for.

Note that there is no problem with unmanaging or managing objects multiple times or repeatedly. Xt avoids the extra work. There *may* be problems, however, in your layout, so, if, for example, you have dependencies for your geometry on a now-unmanaged child, you may indeed get "weird" but correct behavior.