[comp.windows.x.motif] Resizing? Visible Scrollbars?

tbray@watsol.waterloo.edu (Tim Bray) (09/27/90)

Like 80% of the posters here, I'm just getting going with motif (but have been
Xlibbing for a couple years)...  Motif 1.0.A built with gcc on a 386/ix and cc
on a DEC 3100 with stock MIT R4.

1. Motif's pretty good.  It's Wednesday, I started monday, and now have 1100
lines of code and a pretty nifty (if I say so myself) front end to a text
database system.  (Thanks to Mr. Young for his nice book...)

2. This question probably just demonstrates my ignorance of motif culture - a
directed RTFM would be welcome.  I'm baffled by resizing.  I have several
different windows up, each of which has a title, and something complicated,
i.e. a ScrolledList or Command or RowColumn.  So the idea is to do this:

container-of-some-sort
|
|- Label (for the title)
|- composite (== ScrolledList or Command or RowColumn)

I stuff things into the Lists, etc., sometimes move them but usually let the
user take care of their size and where they're scrolled to.

Now what I'd like is for the label to keep out of the way of the composite,
and for the composite to resize itself properly when the user resizes the
window.  The only way this seems to work is if I use a PanedWindow for the
container.  Which is sort of stupid because the user can grab the Sash and
crush/grow the label.  I tried Form and BulletinBoard widgets at the top
level, and the resize message just didn't get through to the children.  The
documentation *really* suggests that the Form widget is the way to go for
this...  I *know* there's gotta be some resource that will get the children to
resize themselves.  What is it?  Or more generally, where to go looking for
such things.  (Or alternatively, freeze the Sash in the PanedW).  I looked at
the source code in Paned.c - yow!

3. I don't really understand the interaction between the different resources
(scrollBarVisiblePolicy, width, resizePolicy) and how they interact to cause
the appearance/disappearance of scrollbars on ScrolledList and Command widgets
in the presence of resizing, list growth/shrinkage.  Where is this explained?

4. I don't understand the things that go into some size policy decisions.  For
example, for one of those ScrolledLists that was sharing a PanedW with a
Label, I set the visibleItemCount resource to 20, and got 18 for no obvious
reason; I assume that the PanedW was muddying the waters somehow.

         University of Waterloo Centre for the New OED
Tim Bray and
         Open Text Systems, Inc.

PS: The machine where motif is is currently out of reach - so I had to guess
at the resource names above - you probably know which ones I'm referring to.