[comp.windows.x.motif] Trouble initializing width of empty List widget

tbray@watsol.waterloo.edu (Tim Bray) (01/09/91)

I'm loading two ScrolledLists into a PanedWidget in a FormWidget.  The trouble
is that the application starts with both these lists empty.  This causes a big
problem with initial horizontal sizing of the lists; I can't seem to find a
resource that will force them to come out at a reasonable width.  Since they
will be used for display of fixed-size items in a monospace font, I know what
a reasonable minimum width is.

I've resorted to preloading one of the lists with an item which is a string of
blanks of the appropriate length - this causes the Pane and Form attachments
to drag the other out to the appropriate size.  But it's a kludge.  Couldn't
find anything in the doc...

Am I missing something?

Tim Bray
tbray@watsol.waterloo.edu

glp@ibism.UUCP (Greg Parkinson) (01/11/91)

In article <1991Jan9.034436.1439@watdragon.waterloo.edu>, tbray@watsol.waterloo.edu (Tim Bray) writes:
> I'm loading two ScrolledLists into a PanedWidget in a FormWidget.  The trouble
> is that the application starts with both these lists empty.  This causes a big
> problem with initial horizontal sizing of the lists; I can't seem to find a
> resource that will force them to come out at a reasonable width.  Since they
> will be used for display of fixed-size items in a monospace font, I know what
> a reasonable minimum width is.
> 
> I've resorted to preloading one of the lists with an item which is a string of
> blanks of the appropriate length - this causes the Pane and Form attachments
> to drag the other out to the appropriate size.  But it's a kludge.  Couldn't
> find anything in the doc...
> 

Can't you set the Form width to your minimum, and allow resizing?
It works for me.....


-- 
Greg Parkinson               Phone:  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 the big 'ol bank.