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 [b]WIDTH[/b] 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 -- Posted via http://www.ruby-forum.com/.
Michael Satterwhite 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 > [b]WIDTH[/b] 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
Michael Satterwhite
2009-Mar-31 16:16 UTC
[wxruby-users] Problem with ListBox height - Thank You!
On Tuesday 31 March 2009 01:28:38 am Alex Fenton 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