Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!agate!velveeta.berkeley.edu!rusty From: rusty@velveeta.berkeley.edu Newsgroups: comp.windows.x Subject: X Toolkit question/problem Message-ID: <7753@agate.BERKELEY.EDU> Date: 17 Mar 88 06:32:39 GMT Sender: usenet@agate.BERKELEY.EDU Reply-To: rusty@velveeta.berkeley.edu () Organization: Math Dept., UC Berkeley Lines: 39 Since, for the time being, popup widgets have to be manually placed with the mouse (at least when uwm is running) I decided to try using the same top level widget. My code looks something like top = XtInitialize("top", "XTools", ...) main_form = XtCreateWidget("main", formWidgetClass, top, ...) quit_button = XtCreateManagedWidget("quit", commandWidgetClass, main_form, ...) (Notice that main_form is using XtCreateWidget, not XtCreateManagedWidget.) quit_button has a callback which uses this confirm/cancel dialog box: confirm_form = XtCreateWidget("confirmForm", formWidgetClass, top, ...) yes_button = XtCreateManagedWidget("yep", commandWidgetClass, confirm_form, ...) no_button = XtCreateManagedWidget("nope", commandWidgetClass, confirm_form, ...) (Here again, notice that confirm_form is using XtCreateWidget, not XtCreateManagedWidget.) After the widgets are set up main() does: XtManageChild(main_form); XtRealizeWidget(top); When the quit button is pressed the quit_button callback does: XtUnmanageChild(main_form); XtManageChild(confirm_form); I was hoping that the top level shell would resize itself when the main_form was "managed out" (XtUnmanageChild) and the confirm_form was "managed in" (XtManageChild), but it just keeps the size of the first widget that was managed, which in my case is too small. Am I doing something wrong or is this a bug or is that just the way it is? -------------------------------------- rusty c. wright rusty@cartan.berkeley.edu ucbvax!cartan!rusty