I have a C client for X Motif that is not showing the scrollbars for a Row Col widget as expected. The main window (toplevel) has a form added to it. In the form I add a label gadget as a top attachment to the left side. Then, I add a Quit button as a top attachment to the right side.
Then I add a ScrolledWindow widget and attach it to the form as a bottom attachment to the left side. I specify the height, width and scrollbar policy value as:
sw = XtVaCreateManagedWidget("scrolled_w", xmScrolledWidgetWidgetClass, form,
XmNwidth, 575,
XmNheight, 120,
XmNscrollingPolicy, XmAUTOMATIC,
XmNscrollBarDisplayPolicy, XmAS_NEEDED, NULL);
Inside the sw widget I create a row col widget and add a bunch of buttons to it. They are displaying fine and going in using the orientation desired.
rowcol = XmCreateRowColumn(sw, "rowcolumn", NULL, 0);
XtVaGetValues(rowcol, XmNforeground, &fg, XmNbackground, &bg,
XmNborderColor, &bord, NULL);
XtVaSetValues(rowcol, XmNpacking, XmPACK_COLUMN,
XmNnumColumns, COLS,
XmNorientation, XmHORIZONTAL,
NULL);
The issue is when I resize the main X window, I "expect" that scrollbars should be applied to the row col window when the size of the main window is not letting the entire scrolled window display. But it doesn't. The only way I can get the scroll bars to show is if I rejig the XmNwidth and XmNheight values for the creation of the window.
Any idea why this is happening?
thx. W.