Forum: wxRuby Problem with ListBox height

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Michael S. (Guest)
on 2009-03-31 02:47
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
Alex F. (Guest)
on 2009-03-31 10:30
(Received via mailing list)
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
> [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 S. (Guest)
on 2009-03-31 20:44
(Received via mailing list)
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
This topic is locked and can not be replied to.