🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.misc
1 messages
1 total messages Started by Qing Zhang Wed, 26 Jun 1991 08:13
Why I couldn't popup different menus by three buttons???
#699
Author: Qing Zhang
Date: Wed, 26 Jun 1991 08:13
68 lines
2355 bytes
Newsgroups: window
Subject: WHY  ONLY POPUP ONE menu with three buttons in MOTIF???
Summary: 
Followup-To: 
Distribution: 
Organization: University of Hawaii at Manoa
Keywords: 

Hello,

I am working a graphic editor. I have been trying to use three buttons by
DEPRESSING ONE OF THEM to popup different popup editing menu within the 
drawingarea. But I only can get one popuped, no second one showed.

What I did is sketched as follows (using the XtAddEventHandler() similar 
approaches like action table can be the same.).
 
main(){
   ...
   create_popupmenu1(drawingarea);
   create_popupmenu2(...);
   create_popupmenu3(...);
   ...
}

create_popupmenu1(){
   popup1 = XmCreatePopupMenu(drawingarea, "popup1", al, ac);
   ... here create title, separator and buttons as children of popup1.
   XtAddEventHandler(drawingarea, ..., PostPupup, popup1);
   ... and XtManageChildren.
}


create_popupmenu2(){
   popup2 = XmCreatePopupMenu(drawingarea, "popup2", al, ac);
   ... here create title, separator and buttons as children of popup1.
   XtAddEventHandler(drawingarea, ..., PostPupup, popup2);
   ... and XtManageChildren.
}

   
PostPopup(w, popup, event)
...
{
    switch(event->button){
         case Button3: 
             case Button3:
             XmMenuPosition(popup3, event);
             XtManageChild (popup3);
             break;
        case Button2:
             XmMenuPosition(popup2, event);
             XtManageChild (popup2);
             break;
        default:
            not available
    }
}

Can any one help me what the problem is? The fuuny thing is if I press the 
MIDDLE BUTTON, no response. When I press button1, the noavailabel message
was printed.

WhY That? Thanks.

---Thomas Y, Huang

 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads