Path: utzoo!attcan!uunet!husc6!bloom-beacon!DINORAH.WUSTL.EDU!y2 From: y2@DINORAH.WUSTL.EDU (Yeong-Yeong Liu) Newsgroups: comp.windows.x Subject: XtUnmapWidget Message-ID: <8807222206.AA08510@dinorah.wustl.edu> Date: 22 Jul 88 22:06:22 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 84 I have a problem when I was trying to use XtUnmapWidget, any help will be appreciated. I created a menu page which has multiple choices, however, some of the choices were not implemented yet. So I created a label widget for message which gets mapped for few seconds then unmapped when an unimplemented function is chosen. My problem is that I can't get the label widget's text to show up. My program flow as follows: . . static Widget w2; . . w = XtCreateWidget("mainwidget",formWidgetClass,toplevel,args,n); XtSetArg(...);n++; /* several XtSetarg() calls*/ w1 = XtCreateWidget("panel",formWidgetClass,w,args,n); XtSetArg(...);n++; /* several calls including one set callback to function c1 */ m1 = XtCreateWidget("choice1",commandWidgetClass,w1,args,n); XtSetArg(...);n++; /* several calls including one set callback to function c2 */ m2 = XtCreateWidget("choice2",commandWidgetClass,w1,args,n); XtSetArg(...);n++; /* several calls including one set callback to function c3 */ m3 = XtCreateWidget("choice3",commandWidgetClass,w1,args,n); . . XtSetArg(...);n++; /* several calls including one set XtNmappedWhenManaged to False AND XtNfromVert to w1 (so w2 will be below w1) */ w2 = XtCreateWidget("not implemented",labelWidgetClass,w,args,n); . . XtManageChild(w); XtRealizeWidget(toplevel); XtMainLoop(); } Assume choice 2 & 3 are not implemented, my code looks like this: void c2(w,client_data,call_data) Widget w; caddr_t client_data; caddr_t call_data; { NotImplemented(); } void c3(w,client_data,call_data) Widget w; caddr_t client_data; caddr_t call_data; { NotImplemented(); } void NotImplemented() { XtMapWidget(w2); XBell(dpy,50); XFlush(dpy); sleep(2); XtUnmapWidget(w2); XFlush(dpy); } Every time when I activated command widget m2, the program came to function c2 then it maps, rings bell, waits two seconds and unmaps. It's all there execpt the text --- "not implemented". If I remove XtSetArg for XtNmappedWhenManaged so it will be left as True by default, then "not implemented" appear below w1 immediately. Activating command m2 starts XtMapWidget(w2) (which does nothing because w2 is already mapped), rings bell, waits, unmaps (they all worked). After that last XtUnmapWidget(w2), I will not see "not implemented" text string again. Thanks for any suggestion. Y Liu {uunet...}!wucs1!dinorah!y2 or wucs1.wustl.edu!dinorah!y2 or y2@dinorah.wustl.edu or 314-362-2950