OK, I'm relatively new to wxruby, but have gotten a few forms successful, and so building up some experience, but have run into a major challenge with the following issue. I want to generate a table-like thing, that has a known number of columns, but a variable number of rows, but the number of rows will be 25 or less; all the rows are to be the same height, but the columns need to be all different widths. So I was using a FlexGridSizer, set the number of columns and rows; I am able to put the sizer into a form and able to put controls into the FlexGrid control without any proble. However all the columns are the same width, and I can't find any combination of flags that will make the the columns anything other than the width of the widest column. Most of the controls going into the grid are TextCtrls and I have specified the "maximum_size" attribute as a Size.new(x,-1) with the following flags: ALIGN_LEFT | ST_NO_AUTORESIZE. When adding the controls to the FlexGrid to "proportion" field is set to zero. And yet all the columns are the same width, the width of the widest sub-control. How can one specify a maximum column size? How does one have a FlexGrid recompute the column widths? Is FlexGrid the wrong thing to do this with?
on 2009-04-19 05:09
on 2009-04-20 02:45
Hi Michael M. wrote: > FlexGrid control without any proble. However all the columns are the > with? > You probably want to call FlexGridSizer#add_growable_col with a proportion > 0 on at least one column in the sizer. That column will then receive available additional space, and the other columns will have the minimum size for their controls. If all proportions == 0, the available space is distributed evenly between all columns: http://wxruby.rubyforge.org/doc/flexgridsizer.html... a