alex@hpgnd.grenoble.hp.com (Alexis MERMET-GRANDFILLES) (06/07/91)
Hello everybody.
Just two questions which should not be too difficult for X-MOTIF experts
over there.
I am using X11-R4 motif 1.1 and UIL.
1/ I want to have a action called whenever the user (ie mouse pointer)
enters a XmFrame widget.
To do so , I have added the following translation table in my UIL code:
object my_frame : XmFrame {
arguments {
XmNtranslations = translation_table(
'#override \n\
<Enter>: help_message(This is my text.) ');
};
};
At run -time all happens as if the Frame does not receive any events.
???
What do I do wrong ?
2/ I want to use a Push-button with a PIXMAP label to make an ICON.
( as in /usr/contrib/Xm/examples/mre : motif ressource editor )
I want to be able to click on it with the button 1 (classical
arm and activate callbacks) and also to click on it with the
right button (button 3). When the user does so, I post a popup-menu
over the push-button.
I tried to install a new translation <Btn3Down>: post_popup().
I also tried to add an event handler 'ButtonPress' on the push
button.
In both cases the result is the same. My action or my event handler
is called only once and the popupmenu is managed.
But, once it is unmanaged, clicking on the 3rd button only results
in the mouse pointer being changed to the 'left to right' arrow
instead of the usual 'right to left' arrow but no popup-menu appears,
and after a while ( 1-2 seconds ) the pointer recovers its 'normal'
state...
What is puzzling me is that it works perfectly if I use the middle
mouse button ( button 2 ) to post my popup-menu. But for some
usability and consistence with MOTIF guide-lines I need to use
the right-button...
object main_testsuite : XmPushButton {
arguments {
XmNlabelType = XmPIXMAP;
XmNlabelPixmap = test_icon;
XmNtranslations = translation_table(
'#override \n\
<Enter>: help_message(my text is here.) \n\
<Btn3Down>: post_popup() ');
};
};
What's wrong ? any idea ?
Feel free to contact me by mail, any help would be much appreciated.
--------------------------------------------------------------------------
Alexis MERMET-GRANDFILLES HEWLETT-PACKARD
Tel: 76 62 12 11 Grenoble Network Division
Fax: 76 62 52 00 5 avenue Raymond Chanas - EYBENS
FRANCE
alex@hpgndxo.grenbole.hp.com 38053 GRENOBLE CEDEX 9
-------------------------------------------------------------------------