[comp.windows.x.motif] multi-columns scrolled

neumann@fzi.uka.de (Dieter Neumann) (11/30/90)

I have a scrolled window with a fixed size which shall scroll some
togglebuttons which are children of a rowcolum widget.
The problem now is, that there is enough space for more than one
column of togglebuttons, but I don't know for how many and if possible,
I don't want to calculate it.
So I tried following for the rowcolumn widget:

  XtSetArg (al[ac], XmNwidth,  800); ac++;
  XtSetArg (al[ac], XmNresizeWidth, False); ac++;
  XtSetArg (al[ac], XmNorientation, XmHORIZONTAL); ac++;

I hoped, that it would put as many togglebuttons as possible into
one row and then wrap. Indeed it worked except, that the height of
the rowcolumn widget becomes just the height of one row, so that
the following rows don't appear.

What am I doing wrong?

Thanks for any help

glp@ibism.UUCP (Greg Parkinson) (12/06/90)

In article <90.333.18:09:25@ira.uka.de>, neumann@fzi.uka.de (Dieter Neumann) writes:
> 
> I have a scrolled window with a fixed size which shall scroll some
> togglebuttons which are children of a rowcolum widget.
> The problem now is, that there is enough space for more than one
> column of togglebuttons, but I don't know for how many and if possible,
> I don't want to calculate it.
> So I tried following for the rowcolumn widget:
> 
>   XtSetArg (al[ac], XmNwidth,  800); ac++;
>   XtSetArg (al[ac], XmNresizeWidth, False); ac++;
>   XtSetArg (al[ac], XmNorientation, XmHORIZONTAL); ac++;
> 
> I hoped, that it would put as many togglebuttons as possible into
> one row and then wrap. Indeed it worked except, that the height of
> the rowcolumn widget becomes just the height of one row, so that
> the following rows don't appear.
> 
> What am I doing wrong?
> 

I have had similar problems doing what I think is the same sort of thing.
I have n widgets, which are to be placed row by row in a row-column.
AND they are of different widths, so not all columns are the same width, 
although all entries in a column are.

The only way I could get this to work is to create a "single line" rowcolumn
which is the size of one row.  I create one of these (with my different size
elements), and then add the single-line rowcolumn to the main rowcolumn, which
now thinks it is a single column wide.  Makes the code a little loopier
but works like a charm.

Why is it so difficult to just set up a rowcolumn which will accept things
in row order?  



> Thanks for any help

-- 

Greg Parkinson               (212) 657-7814
Citibank                     Fax:    212-657-0068
111 Wall Street              E-Mail: uunet!ibism!glp
New York, NY  10043
The opinions expressed are my own and not those of Citibank.