[comp.windows.x.motif] Setting the width of an empty XmList

tap@stl.stc.co.uk (Tony Plant) (04/15/91)

Hi All,


Environment : Sun 4, SunOS 4.1, X11R4, Motif 1.0


	I wish to create a set of XmList Widgets inside an XmRowColumn
Widget. I know the maximum width of the XmLists and the number of visible
items. However, at the time of creation the XmLists are empty (So why
create them ? Long story, mostly "commercial in confidence", but I do
need to create them.

	The required height for the Lists is set with the
XmNvisibleItemCount resource and this works fine. However, any width I
might specify, using the XmNwidth resource, is completely ignored.

	If I use XtQueryGeometry to ask the RowColumn it's preferred
size, it reports a width and height of 16 pixels (default size for
RowColumn). Adding the List Widget and querying again reports a width
of 30 pixels, regardless of the value I set for XmNwidth.

	My theory is that the RowColumn asks it's List children for
their *preferred* size. The preferred size of an empty XmList is a
height as calculated from the current font and XmNvisibleItemCount and
a width as small as possible. This preferred width is smaller than the
width I wish to set. 


	So how do I get my empty List to have the desired width ?

	Thanks in advance,

Bye
Tony

--
-------------------------------------------------------------------
Tony Plant     	     	      | BNR (Europe) Ltd, Harlow, Essex, UK, CM17 9NA
(aka T.A.Plant@stl.stc.co.uk) | Tel : +44 279 429531 ext 2109

The Company has changed it's name
But the song remains the same !
-------------------------------------------------------------------