clyne@redcloud.ucar.edu (John Clyne) (03/01/89)
I have a couple a questions about the Xt toolkit that I hope someone can answer. First, what is the difference/advantage between using the combination XtCreateWidget, XtManageChild and simply using XtCreateManagedWidget? Secondly, I am trying to supply a dialog widget from the Athena Widget set with default a width so that the dialog box comes up in a size that is likely to be able to hold the text input without resizing. The dialog widget is the child of a box widget. If I use pass the hardcoded width in an ArgList to XtCreateManagedWidget it is ignored. However, If I use XtSetValues to set the width immediately after I call XtCreateManagedWidget then the dialog box comes up with the dimension I gave it. Why is this? And what is the correct/acceptable protocol? thanks in advance - John clyne John Clyne (clyne@bierstadt.ucar.edu) c/o National Center for Atmospheric Research P.O. Box 3000 Boulder, Colorado 80307 (303) 497-1236 %%% Its a small world. But I wouldn't want to paint it %%% S. Wright %%% %%%
kit@ATHENA.MIT.EDU (Chris D. Peterson) (03/07/89)
> I have a couple a questions about the Xt toolkit that I hope someone can > answer. First, what is the difference/advantage between using the > combination XtCreateWidget, XtManageChild and simply using > XtCreateManagedWidget? Before realize time there is absolutely not difference, there is one call to the parent's ChangeManaged Proccedure at realize time for all widgets that have been managed prior to that time. After realize time it is much more efficient to use XtCreateWidget() and then make a call to XtManageChildren() for all children of the same parent that you want to manage. This causes the parent to only relayout its children once. > Secondly, I am trying to supply a dialog widget > from the Athena Widget set with default a width so that the dialog box > comes up in a size that is likely to be able to hold the text input without > resizing. The dialog widget is the child of a box widget. If I use pass > the hardcoded width in an ArgList to XtCreateManagedWidget it is ignored. > However, If I use XtSetValues to set the width immediately after I call > XtCreateManagedWidget then the dialog box comes up with the dimension I > gave it. Why is this? Sounds like a bug in the dialog widget, How about writing this up, providing some example code, and sending it into xbugs@expo.lcs.mit.edu. There is a sample bug-report in doc/bugs/bug-report on the XTape. Chris D. Peterson MIT X Consortium / Project Athena Net: kit@athena.mit.edu Phone: (617) 253 - 1326 USMail: MIT - Room E40-321 77 Massachusetts Ave. Cambridge, MA 02139