nancie@hal.CSS.GOV (Nancie Matson) (06/13/90)
I've been playing with the SimpleMenuWidget in R4 and I would like to know if I can have a SMW that's a child of another widget, other than the toplevel. Whenever I tried to change the parent, I had lots of problems getting the widget to pop-up using XawPositionSimpleMenu and MenuPopUp. Does anyone have any suggestions on how to accomplish this? I'm open to any suggestions... I'm trying to create a display with multiple widgets managed by a form widget, and I want each one to have a different pop-up menu associated with it when the same mouse button is selected in each window. -nancie
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (06/13/90)
> I've been playing with the SimpleMenuWidget in R4 and I would > like to know if I can have a SMW that's a child of another > widget, other than the toplevel. Whenever I tried to change > the parent, I had lots of problems getting the widget to > pop-up using XawPositionSimpleMenu and MenuPopUp. The parent of the simple menu can be any widget. Remember that the simple menu expects to be a popup child, not a normal child. You should use XtCreatePopupShell() not XtCreateWidget() to create your menus. > I'm trying to create a display with multiple widgets managed by a form widget, > and I want each one to have a different pop-up menu associated with it when the > same mouse button is selected in each window. Sounds like exactly what the R4 version of Xmh does with its folder buttons when you have sub-folders. Perhaps this code will be helpful (although its pretty twisty.) Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213