What`s the reason of difference size of

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
What`s the reason of difference size of

Submitted by Anonymous on Thu, 10/12/2000 - 13:58. Developers
XmCreateOptionMenu() between LessTif and openMotif?

I developed some kind of motif application at HP-UX, and now I am going to migrating it to Linux environment.
At the first, LessTif library was so good but it dosen`t support Multi-byte language just like Korean-my national language,
so that I decided openMotif library is best choice of my purpose.
Fortunately, It was very well done for my language. but Unfortunately, XmCreateOptionMenu()`size was look like strange thing
which was fatish vertically(HP-UX, LessTif have no problem!).

What`s the reason?

Someone help me! please~~.

Anonymous

Motif 2.1 is a lot more strict than Motif 1.2 about how you need to create option menus. You must create the option menu exactly as documented.

1. Create the XmPulldownMenu. The parent widget must be the same parent as is planned for the XmOptionMenu.

2. Create the XmOptionMenu and in the ArgList you pass when you create the option menu, set the XmNsubMenuId resource to the XmPulldownMenu you created above.

The code will look something like

numargs = 0;
pulldown = XmCreatePulldownMenu(parent, "menuname", args, numargs);

numargs = 0;
XtSetArg(args[numargs], XmNsubMenuId, pulldown);
numargs++;
option = XmCreateOptionMenu(parent, "option", args, numargs);

Anonymous

The difference between openmotif and other Motif just like LessTif and Motif Enterprise Edition was at XtVaSetValues() behaviour.

Most of Motif(Old Version?) sample program didn`t restrict the order of PullDownMenu and OptionMenu, so that I used OptionMenu like ComboBox by self made Library Routine.

This library include XtVasetValues( optionbox, XmNsubMenuId, pulldown, NULL );, and return Widget of pulldownMenu in order to manipulate Add,Delete, Modify, Search..etc at external referencing routine.

External referencing routine do not have to create pulldownMenu because internal routine should be done everything.

I don`t know what`s the reason of changing behaviour^^.

At this circumstance, My library routine is encounted at dangerous state.

External referencing routine have to prepare one count of blank of ArgList to use for XtSetArg( args[n], XmNsubMenuId ); n++; at my internal library routine,
And I must change order of creation internally.

Oooo-op!