hg1915@milton.u.washington.edu (Helen Gottschalk) (03/02/91)
#Does anyone know, why is it soooo slow to put widgets into BulletinBoardDialog
#or anything derived from it.
#For example, try:
# dialog = XmCreateFormDialog(parent, "dialog", NULL, NULL);
#
# toggleButton = (Widget) XtCreateWidget("toggleButton",
# xmToggleButtonWidgetClass, dialog, NULL, NULL);
# label = (Widget) XtCreateWidget("label",
# xmLabelWidgetClass, dialog, NULL, NULL);
# .
# .
# .
# someOther = (Widget) XtCreateWidget("someOther",
# xmSomeOtherWidgetClass, dialog, NULL, NULL);
#
#Changing XmCreateFormDiaog to XmCreateForm speeds thing up by at least a
#factor of 10. We are using ISC UNIX System V.3.2.2.2, ISC X11.3, ISC Motif 1.0.
We found a beautiful solution to the "slow Dialogs" problem.
Here is the code:
XtSetArg(args[0], XmNmwmInputMode, 1);
popupShell = XtCreateWidget("Config", transientShellWidgetClass,
ShellParent, args, 1);
someForm = XtCreateManagedWidget("SomeForm", xmFormWidgetClass,
popupShell, NULL, NULL);
XtPopup(popupShell, XtGrabExclusive);
This creates an equivalent of XmFormDialog, but it is much faster to put widgets
into it.
Thank you all that tried to help with the problem.
Tania.
--
----
SpaceLabs Inc. hg1915@milton.u.washington.edu
Redmond, WA