search for: align_center_horizontal

Displaying 2 results from an estimated 2 matches for "align_center_horizontal".

2004 Nov 22
1
Layout Issue ...
...;Test", Wx::DEFAULT_POSITION ) @panel = Wx::Panel.new( @frame ) @topSizer = Wx::FlexGridSizer.new( 1, 3 ) @topSizer.add( createInputSizer(), 1, Wx::GROW|Wx::ALL, 2 ) @topSizer.add( createGridSizer(), 1, Wx::GROW|Wx::ALL, 2 ) @topSizer.add( createButtonSizer(), 1, Wx::ALIGN_CENTER_HORIZONTAL|Wx::ALL, 2 ) @panel.set_sizer( @topSizer ) @topSizer.fit( @frame ) @frame.show self.main_loop end def createButtonSizer @buttonSizer = Wx::BoxSizer.new( Wx::HORIZONTAL ) @btn1 = Wx::Button.new(@panel, -1, ''Button 1'') @buttonSizer...
2007 Feb 19
2
Sizer question
...'t seem to figure this out. Here''s an example of my code: parent = Wx::Panel.new(frame, -1, Wx::Point.new(0, 0), Wx::Size.new (823, 900)) sizer = Wx::BoxSizer.new(Wx::VERTICAL) child = Wx::Panel.new(parent, -1, Wx::Point.new(0, 0), Wx::Size.new (823, 200)) sizer.add(child, 1, Wx::ALIGN_CENTER_HORIZONTAL, 0) parent.set_sizer(sizer) When I resize the window, the size of the child panel grows to consume the entire height of the parent. I''d like the child''s height to remain 200. I''ve tried: - child.set_max_size(Size.new(823, 200)) - sizer.add(child, 1, 0|Wx::ALIGN...