137) What functions can an application use to change the size or

position of a widget?

Answer: Applications should set the values of the XmNx, XmNy, XmNwidth, and
XmNheight resources.

Note that many manager widgets ignore the XmNx and XmNy resources of their
children, relying instead on their internal layout algorithms.  If you really
want specific positions, you must use a manager widget that allows them, e.g.,
XmBulletinBoard.

Also note that some manager widgets reject size change requests from their
children when certain resources are set (e.g., XmNresizable on XmForm).
Others allow the the children to resize, but clip the results (e.g.,
XmNallowShellResize on shell widgets).  Make sure you have these resources set
to the policy you want.

Due to bugs, some widgets (third party widgets) do not respond to changes in
their width and height.  Sometimes, you can get them to respond correctly by
unmanaging them, setting the resources, then managing them again.

Under no circumstances should applications use routines like
XtConfigureWidget() or XtResizeWidget().  These routines are reserved for
widget internals and will seriously confuse many widgets.  _ thanks to Ken
Lee, klee@synoptics.com ----------
Go Back Up

Go To Previous

Go To Next