you dont necessarily have to create widgets everytime you need one. Also handling the widgets at the XmRowColumnWidget class level is not the best way to go.
I would suggest usage of the Widget managers to do this.
Managing and unmanaging widgets should be sufficient. This way the widgets need not be created or destroyed everytime, just manage them when you need them and unmanage them when you dont need them.
I assume you have a parent widget set up which can be used to manage the children widgets.
You can call the following
XtManageChildren
or
XtManageChild
XtManageChild is computationally intensive since it makes a call everytime to the parent widget's change_managed procedure
Alternately you can also do the following:
Map the widget only when needed. To do this you need to set a widget's XmNmappedWhenManaged to false. Otherwise the widget gets mapped automatically when you manage it.
Main Topics
Browse All Topics





by: jb1devPosted on 2009-11-04 at 10:55:21ID: 25742572
Can't you add widgets (rows or whatever) to the XmRowColumnWidgetClass container by calling one of:
ng name, WidgetClass widget_class,
ring name, WidgetClass widget_class,
Widget XtCreateWidget(String name, WidgetClass widget_class, Widget
parent, ArgList args, Cardinal num_args);
Widget XtVaCreateWidget(String name, WidgetClass widget_class, Widget
parent, ...);
Widget XtCreateManagedWidget(Stri
Widget parent, ArgList args, Cardinal num_args);
Widget XtVaCreateManagedWidget(St
Widget parent, ...);
And passing the XmRowColumnWidgetClass as parent?