XmNpositionIndex in rowcolumn not works?

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

Questions about motif? Contact us

3 posts / 0 new
Last post
XmNpositionIndex in rowcolumn not works?

Submitted by Anonymous (not verified) on Fri, 06/15/2012 - 12:07

I have an horizontal rowcolumn widget rc1 where i've inserted tho push button
and i've manage it.
After, I must insert another rowcolumn rc2 at the beginning of rowcolumn childrens
I create the rowcolumn rc2 and i set rc2's XmNpositionIndex to 0 via
...
XtVaSetValues(rc2, XmNpositionIndex, 0, NULL);
...
but it doesn't work. It is inserted at the end.
Can you help me? I use Motif 1.2
‹ 32-bit motif libraries for IPF how to use these keysym ??? ›

Anonymous

Mon, 02/16/2004 - 15:51#1

Re: XmNpositionIndex in rowcolumn not works?

Does this program do what you want?

<br />
#include <Xm/XmAll.h></p>
<p>Widget toplevel, rc1, rc2, button;<br />
XtAppContext App;<br />
Cardinal n;<br />
Arg arg[20];</p>
<p>void insert(Widget w, XtPointer client_data, XtPointer call_data)<br />
{<br />
n = 0;<br />
XtSetArg(arg[n], XmNpositionIndex, 0); n++;<br />
rc2 = XmCreateRowColumn(rc1, "rc2", arg, n);<br />
XtManageChild(XmCreatePushButton(rc2, "button_in_rc2", arg, n));<br />
XtManageChild(rc2);<br />
}</p>
<p>int<br />
main (int argc, char **argv)<br />
{</p>
<p> toplevel =<br />
XtVaAppInitialize (&App, "xmNavigator", NULL, 0, &argc, argv, NULL,<br />
XmNwidth, 200,<br />
XmNheight, 100,<br />
NULL);</p>
<p> n = 0;<br />
XtSetArg(arg[n], XmNorientation, XmHORIZONTAL); n++;<br />
rc1 = XmCreateRowColumn(toplevel, "rc1", arg, n);<br />
n = 0;<br />
button = XmCreatePushButton(rc1, "press me", arg, n);<br />
XtAddCallback(button, XmNactivateCallback, insert, (XtPointer)NULL);</p>
<p> XtManageChild(button);<br />
XtManageChild(rc1);<br />
XtRealizeWidget (toplevel);<br />
XtAppMainLoop (App);<br />
return 0;<br />
}<br />

Anonymous

Mon, 02/16/2004 - 16:34#2

XmNpositionIndex in rowcolumn not works?

Thanks,
it make the work!