Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!igor!drk From: drk@Rational.COM (David Kaelbling) Newsgroups: comp.windows.x.motif Subject: Troubles using popup menus from PushButtonWidgets Keywords: Popup, XmPushButtonWidget Message-ID: <842@igor.Rational.COM> Date: 6 Feb 91 01:17:20 GMT Organization: Rational, Santa Clara, CA Lines: 26 The goal: Make a push button that when selected (button 1 pressed, *not* button 3) popups up a menu. Having the button arm while the the menu is up would be nice, but isn't crucial. I'm using Motif 1.1.1 and the standard fully patched MIT X.V11R4 libraries on a Sun-SLC. The problem: Setting XmNwhichButton (I know -- it's obsolete, but it works) allows the menu to actually appear. All works well *once*. The next time the cursor enters the button window, it arms itself! My pet theory was that because the menu grabbed the mouse button, normal cleanup (disarming) didn't happen. Failed solutions: I've tried almost every permutation of actions in the translation table. Replacing Btn1Down so it explicitly invokes Disarm(), Leave(), BtnDown(), etc. Using ":Leave()" so Arm() is never called doesn't work either -- the next time the mouse enters, the button still thinks it is armed. Does anybody know the right incantation? Thanks, David -- David Kaelbling (408) 496-3600 c/o Rational; 3320 Scott Boulevard; Santa Clara, CA 95054-3197 Email: DKaelbling@Rational.COM, or uucp {uunet,ubvax,aeras}!igor!drk