Path: utzoo!attcan!uunet!husc6!bloom-beacon!VLSI.JPL.NASA.GOV!donnelly%asd.span From: donnelly%asd.span@VLSI.JPL.NASA.GOV Newsgroups: comp.windows.x Subject: Popup menus and X Message-ID: <880817061454.23d@VLSI.JPL.NASA.GOV> Date: 17 Aug 88 13:14:54 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 35 I have been studying the recently posted examples exhibiting code for creation of popup menus in X. I have also been studying the X Toolkit Intrinsics documentation, and have two questions: [1] How am I to know that the text displayed in a widget of type commandWidgetClass is the first argument to XtCreate- ManagedWidget? e.g. button=XtCreateManagedWidget("yes",commandWidgetClass,menu_bar, (Arg *)0,ZERO); produces a button labled "yes", but where would I find that documented? [2] If I understand things correctly, the procedure XtCreate- ManagedWidget returns a Widget. Given this, what happens when several widgets have the same name, as in this sequence: . . . some_parent=XtCreateManagedWidget("menu",boxWidgetClass,toplevel, (Arg *)0,ZERO); button=XtCreateManagedWidget("yes",commandWidgetClass,some_parent, (Arg *)0,ZERO); button=XtCreateManagedWidget("no" ,commandWidgetClass,some_parent, (Arg *)0,ZERO); . . . I understand that I get two buttons labeled "yes" and "no", but I am confused that both seem to refer to the same Widget, button. Could some patient soul enlighten me? THANKS! R. Donnelly Lockheed, Johnson Space Center