🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24079

Why my popup menu not poping up???

#24079
From: Thomas Huang
Date: Tue, 25 Jun 1991 23:51
34 lines
1541 bytes
Hello Xperts
I  programmed in Xt before. Now I am working on a graphic editor in MOTIF.
I am trying to press the right button in the DrawingArea to popup a Edit
menu (Very similar to the idea in XFIG.). But it just does not react at all.
Procedures followed:-

void EditPopup()
{
   popup = XmcreatePopupMenu (DrawingArea, "edit_popup", wargs, n);
   ... Here create the label and pushbuttons as the children of the popup
   XtAddEventHandler(DrawArea, ButtonPressMask, False, PostIt, popup);
   XtManageChildren(popup_buttons, num_buttons);
}

And the event handler is as follows:
void PostIt (w, popup, event)
   Widget w;
   Widget popup;
   XButtonEvent * event;
{
    if (event->button != Button3)
          return;
    XmMenuPosition(popup, event);
    XtManageChild (popup);
}

Would anyone advise me why I could not make it work? I TRIED Other approach to
use action table. But that did not work either.
I appreciate your earlier reply. I was stopped here for two days already!!
Thanks.
My E-Mail: yhuang@bishop.ics.hawaii.edu  OR
           yhuang@wiliki.eng.hawaii.edu

--Thomas Y. Huang
Technical Details
Message-ID: <9106252354.AA03727@expo.lcs.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!uunet!ora!bloom-beacon!dont-send-mail-to-path-lines

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!uunet!ora!bloom-beacon!dont-send-mail-to-path-lines
From: yhuang@wiliki.eng.hawaii.EDU (Thomas Huang)
Newsgroups: comp.windows.x
Subject: Why my popup menu not poping up???
Message-ID: <9106252354.AA03727@expo.lcs.mit.edu>
Date: 25 Jun 91 23:51:16 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 34