Problem with ListBox height

I have a Wx::ListBox control in a BoxSizer in a dialog. I’m using the
Wx::GROW option for the box. The ListBox is properly sizing to the
WIDTH of the sizer, but it isn’t sizing vertically at all.
Initially, the ListBox has no items in it (the contents of the box is
under control of the user). Even with no items, I want to see it sized
vertically to the allocated size. The fact that it is empty (or only has
2 or three items) shouldn’t inhibit its vertical size.

Can anyone offer any help?

—Michael

Michael S. wrote:

I have a Wx::ListBox control in a BoxSizer in a dialog. I’m using the
Wx::GROW option for the box. The ListBox is properly sizing to the
WIDTH of the sizer, but it isn’t sizing vertically at all.
Initially, the ListBox has no items in it (the contents of the box is
under control of the user). Even with no items, I want to see it sized
vertically to the allocated size. The fact that it is empty (or only has
2 or three items) shouldn’t inhibit its vertical size.

Give a non-zero proportion argument to Sizer#add - this tells the Sizer
how much of the main dimension (eg vertical) to allocate to that widget.

hth
a

On Tuesday 31 March 2009 01:28:38 am Alex F. wrote:

Give a non-zero proportion argument to Sizer#add - this tells the Sizer
how much of the main dimension (eg vertical) to allocate to that widget.

Thank you very much. I’m still learning wxruby / wxwidgets. I appreciate
the
help!

----Michael