Submitted by Anonymous (not verified) on Fri, 06/15/2012 - 12:07
I`m creating an XmRowColumn popup menu in Motif 2.1.30 on Red Hat Linux,
using the XmCreatePopupMenu utility function. It is being parented on the window
manager shell for a dialog, because I`m sharing the same popup menu across
the application. The XmRowColumn widget contains a set of XmPushButton
widgets.
The problem I`m experiencing is that the menu entry under the cursor is not
being highlighted as the cursor is moved around the popup menu. Selection
is still working correctly, however (ie, release of MB1 over an entry (ie, the
correct button`s activate callback is being called).
Highlighting of the XmRowColumn entries will work correctly under two
circumstances
1- Moving the cursor out of, then back into, the XmRowColumn widget will
result in correct highlighting of the entries until the mouse button is released.
Bringing up the popup menu again will result in the entries NOT being
highlighted unless the mouse is again moved out of, and back into, the popup.
2- Clicking MB3 anywhere within the parent shell window will result in the popup
XmRowColumn correctly highlighting the entries any time it is brought up.
Moving the mouse out of, and back into, the popup is no longer necessary!
Can anyone suggest why this behavior might be happening? I assume I need
to initialize something that I`m missing, but that clicking MB3 in the parent shell
is setting. But I have no idea what! Any suggestions would be greatly appreciated.
Thanks,
Mike McCabe
‹ XtVaCreatePopupShell... Title too long with Warning Dialog. ›
Wed, 12/18/2002 - 22:08#1
Problems with highlights in popup menu
Actually, it doesn`t sound like you are doing anything wrong. I would, however, try using the top-level non-shell child instead of the top shell. The keyboard magic is done through the Manager subclasses. There should be a single child of the shell, so this should be a one-word change in your code.
Thu, 01/02/2003 - 16:36#2
Problems with highlights in popup menu
Actually, I was a little incorrect in my original description.
The buttons inside of the popup menu were Pushbutton Gadgets. Changing
them to Pushbutton Widgets mostly solved the highlight problem. With widgets,
the only menu entry which is not correctly highlighted is the one the mouse is
over when the menu comes up. It remains not highlighted until the mouse is
moved off of that entry, and back over it.
Unfortunately, the entry with the mouse originally over it will also NOT be
selected if MB1 is released without ever moving the mouse off, and back over,
that widget.
The widget version reacts the same way as the gadget version to any MB3
click over the popup menu`s parent clicking MB3 inside of the parent prior to
popping up the menu `fixes` the highlight problems.
I`ve tried this both with using the shell widget as the parent of the option menu,
and with using a form widget (one within the dialog, not the top-level form widget)
as the parent. I get exactly the same behavior for either, with the exception that
the MB3 `fix` works anywhere within the dialog if I`m using the shell parent, while
MB3 must be clicked within the form widget to `fix` the highlighting if I`m using
the form widget as the parent.
Note that this highlighting problem does not occur using Sun`s Solaris 8 version
of Motif 2.1.
Any other suggestions? Does anyone know what the MB3 click within the parent
of the popup menu might be doing? Is there any way for me to programmatically
do the same thing?
Thanks!
Tue, 11/04/2003 - 19:55#3
Problems with highlights in popup menu
I have the same problem. Its obviously a bug.
One workaround is, once the menu is positioned and managed, use XWarpPointer to move the mouse pointer off the menu and then back on. There`s no visual effect but the menu will then work as expected. Neil