dmbeal@uswnvg.UUCP (Dave Beal) (05/13/91)
We are developing an application which involves having the user select one or more messages from a list of messages with button 1. When the user selects the messages, a popup menu appears with a menu of choices for the user to select from, each of which involves performing some action on the selected messages. We use a homebrew widget for the list of messages and can recognize a button 1 press and release. We manually manage (popup) the popup menu. Unfortunately, Motif calls for the default button on a popup to be button 3. We would like to use button 1 to limit the confusion factor for the poor user. Unfortunately, when we set the XmNwhichButton (apparently this becomes XmNmenuPost in motif 1.1) to switch the button, motif takes over complete control of button 1 and our homebrew widget never sees a button 1 press/release. We have come up with a work-around which involves using XtAddEventHandler to add event handlers for each pushbutton on the popup menu and not using the XmNwhichButton resource on the popup menu. In the event handler routine, we ignore all buttons except for button 1. It works the problem except that the only way to get the menu to pop down without making a selection is to move the pointer off the menu and hit button 3 (remember, we didn't change the default). Moving off the menu and pressing button 1 won't work the problem. You wouldn't expect it to because we just added event handlers to the pushbuttons in the menu. A button event in la-la land is never going to be seen by our event handler...only by the popup menu handler which only sees button 3. The question is, is there any way to make a popup menu use button 1 without taking over total control of button 1 when the menu is not popped up so that we can still use it in our homebrew widget? Or perhaps, is there another way of accomplishing the same thing using a different motif widget? Using button 3 in the popup is not really a viable option for us. Even with putting a "Use button 3" label at the top the popup it is confusing to the user. Also, not all mice have three buttons. Dave Beal U S WEST NewVector uunet!uswnvg!dmbeal
nazgul@alfalfa.com (Information Junkie) (05/14/91)
> We use a homebrew widget for the list of messages and can recognize a button 1 > press and release. We manually manage (popup) the popup menu. Unfortunately, > Motif calls for the default button on a popup to be button 3. We would > like to use button 1 to limit the confusion factor for the poor user. Seems to me that using button 1 will *increase* the confusion factor. Remember that the user isn't just using your application, they also are using other applications - and if they all do popups on button 3 (ours certainly does) then your application is going to cause confusion. I will agree that it isn't always intutitive to someone who's used to a one button mouse, but as more and more applications get out there things like this become more and more standard. > at the top the popup it is confusing to the user. Also, not all mice have > three buttons. The three button problem presumably has standard work arounds in the Motif style guide. Alfalfa Software, Inc. | Poste: The EMail for Unix nazgul@alfalfa.com | Send Anything... Anywhere 617/646-7703 (voice/fax) | info@alfalfa.com I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.