T.R | Title | User | Personal Name | Date | Lines |
---|
5921.1 | | GERUND::WOLFE | I'm going to huff, and puff, and blow your house down | Tue Jan 28 1997 12:57 | 13 |
| What platform on you on (VMS, UNIX)?
I use XmNmenuHistory for option menus. You can set which item in the menu
should be the current item and you can query the current item using
this resource. It definitely works in Digital UNIX V4.0 (Motif 1.2-4)
and has always worked for me in the past on all Motif revs.
The value returned from a XtGetValues for an options menu should be
the widget id of the currently selected widget in the menu. Are they
seeing the wrong widget id or garbage? Try using editres to see
what the widget thinks the setting is before you query it.
Pete
|
5921.2 | | H2SO4::GERSBACH | Edwin Gersbach MCS Switzerland | Wed Jan 29 1997 04:07 | 5 |
| I've written a small ADA application which makes use of this resource, but only
by setting it. I've seen no problems on VMS 6.1/6.2 Motif 1.2-4 (both VAX and
AXP).
Edwin
|
5921.3 | any explanation | MDR01::NIEVES | MCS Madrid | Thu Jan 30 1997 07:48 | 30 |
| The customer says that the only time the value she puts in the
XMENUHISTORY appears is the first time, when she does fetch, all the
following times this value doesn't have the one she put there.
This is what she told me:
the first time she creates the window and the window appears (fetch)
she checks the window exists, if
it does't exist she does fetch of the mrm jerarchy of the window.
In Ada, in the menu history she puts the value she wants, she manages the
whole window and she makes the window dissapear (she doesn't destroy the
window). The following time
she wants the window to appear she doesn't have to do fetch because the
window exists, so she puts a value in the xmnenuhistory and do manage,
but doesn't do fetch, the window appears, but the xmnenuhistory doesn't
get the value she put in, instead the value that appears is the last
window selected in the optionmenu before doing dismiss.
She says that the value she puts in the xmenuhistory only appears
correctly the first time, not the following ones.
She has tried to change the example in ADA$EXAMPLES:XM_BURGER, she
reset the optionmenu to put a default value similar to the one of the
DEC_BURGER.C and it does the same as if you don't put any value.
Which is the correct behaviour of the function?
Nieves
|
5921.4 | | H2SO4::GERSBACH | Edwin Gersbach MCS Switzerland | Mon Feb 03 1997 03:49 | 8 |
| >> ...so she puts a value in the xmnenuhistory and do manage,
>> but doesn't do fetch ...
What value? The value she would like to see? That would be wrong!
The value has to be the widget id of a menu button!
It may help if you show us some of their code used to change that value.
Edwin
|
5921.5 | This seems to work for me. | DV780::BROOKS | Use the source Luke! | Mon Feb 03 1997 11:54 | 35 |
| I have been successful in setting the XmNmenuHistory resource of an
option menu by doing the following:
Widget FORM_id, menu, opt_button;
menu = XtNameToWidget(FORM_id, "*MENU");
opt_button = XtNameToWidget(FORM_id, "*option_PB");
n = 0;
XtSetArg(args[n], XmNmenuHistory, opt_button); n++;
XtSetValues(menu, args, n);
In this case MENU is the name of the option menu and option_PB is the
name of the XmPushButton in the XmPulldownMenu. So the widget
hierarchy is
XmForm - FORM_id is the widget ID of the XmForm container
XmOptionMenu - MENU is the name of the option menu in the Form.
XmPulldownMenu - this is the pulldown menu attached to the
XmOptionMenu.
XmPushButton - option_PB is the name of the pushbutton
that I want to be shown as selected in
the option menu. This XmPushButton is
a child of the XmPulldownMenu.
.
.
.
List of other XmPushButtons in XmPulldownMenu
.
.
.
This has worked on every platform that I have tried and I am not aware
of any bugs on DIGITAL platforms. However, I do most of my work on non
DIGITAL platforms, so someone more knowledgeable on DIGITAL platform
will have to speak up if there is a known problem.
|