Class: Wx::GridSizer
Overview
A grid sizer is a sizer which lays out its children in a two-dimensional table with all table fields having the same size, i.e.
the width of each field is the width of the widest child, the height of each field is the height of the tallest child.
Category: Window Layout
Direct Known Subclasses
Instance Method Summary collapse
-
#calc_min ⇒ Wx::Size
This method is abstract and has to be overwritten by any derived class.
-
#get_cols ⇒ Integer
(also: #cols)
Returns the number of columns that has been specified for the sizer.
-
#get_effective_cols_count ⇒ Integer
(also: #effective_cols_count)
Returns the number of columns currently used by the sizer.
-
#get_effective_rows_count ⇒ Integer
(also: #effective_rows_count)
Returns the number of rows currently used by the sizer.
-
#get_h_gap ⇒ Integer
(also: #h_gap)
Returns the horizontal gap (in pixels) between cells in the sizer.
-
#get_rows ⇒ Integer
(also: #rows)
Returns the number of rows that has been specified for the sizer.
-
#get_v_gap ⇒ Integer
(also: #v_gap)
Returns the vertical gap (in pixels) between the cells in the sizer.
-
#initialize(*args) ⇒ GridSizer
constructor
A new instance of GridSizer.
-
#reposition_children(minSize) ⇒ void
Method which must be overridden in the derived sizer classes.
-
#set_cols(cols) ⇒ void
(also: #cols=)
Sets the number of columns in the sizer.
-
#set_h_gap(gap) ⇒ void
(also: #h_gap=)
Sets the horizontal gap (in pixels) between cells in the sizer.
-
#set_rows(rows) ⇒ void
(also: #rows=)
Sets the number of rows in the sizer.
-
#set_v_gap(gap) ⇒ void
(also: #v_gap=)
Sets the vertical gap (in pixels) between the cells in the sizer.
Methods inherited from Sizer
#add, #add_spacer, #add_stretch_spacer, #clear, #compute_fitting_client_size, #compute_fitting_window_size, #detach, #each_child, #fit, #fit_inside, #get_children, #get_containing_window, #get_item, #get_item_by_id, #get_item_count, #get_min_size, #get_position, #get_size, #hide, #inform_first_direction, #insert, #insert_spacer, #insert_stretch_spacer, #is_empty, #layout, #prepend, #prepend_spacer, #prepend_stretch_spacer, #remove, #replace, #set_containing_window, #set_dimension, #set_item_min_size, #set_min_size, #set_size_hints, #show, #show_items
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize(cols, vgap, hgap) ⇒ Wx::GridSizer #initialize(cols, gap = (Wx::Size.new(0, 0))) ⇒ Wx::GridSizer #initialize(rows, cols, vgap, hgap) ⇒ Wx::GridSizer #initialize(rows, cols, gap) ⇒ Wx::GridSizer
Returns a new instance of GridSizer.
64 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 64 def initialize(*args) end |
Instance Method Details
#calc_min ⇒ Wx::Size
This method is abstract and has to be overwritten by any derived class.
Here, the sizer will do the actual calculation of its children’s minimal sizes.
132 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 132 def calc_min; end |
#get_cols ⇒ Integer Also known as: cols
Returns the number of columns that has been specified for the sizer.
Returns zero if the sizer is automatically adjusting the number of columns depending on number of its children. To get the effective number of columns or rows being currently used, see #get_effective_cols_count
70 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 70 def get_cols; end |
#get_effective_cols_count ⇒ Integer Also known as: effective_cols_count
Returns the number of columns currently used by the sizer.
This will depend on the number of children the sizer has if the sizer is automatically adjusting the number of columns/rows.
84 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 84 def get_effective_cols_count; end |
#get_effective_rows_count ⇒ Integer Also known as: effective_rows_count
Returns the number of rows currently used by the sizer.
This will depend on the number of children the sizer has if the sizer is automatically adjusting the number of columns/rows.
91 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 91 def get_effective_rows_count; end |
#get_h_gap ⇒ Integer Also known as: h_gap
Returns the horizontal gap (in pixels) between cells in the sizer.
96 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 96 def get_h_gap; end |
#get_rows ⇒ Integer Also known as: rows
Returns the number of rows that has been specified for the sizer.
Returns zero if the sizer is automatically adjusting the number of rows depending on number of its children. To get the effective number of columns or rows being currently used, see #get_effective_rows_count.
77 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 77 def get_rows; end |
#get_v_gap ⇒ Integer Also known as: v_gap
Returns the vertical gap (in pixels) between the cells in the sizer.
101 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 101 def get_v_gap; end |
#reposition_children(minSize) ⇒ void
This method returns an undefined value.
Method which must be overridden in the derived sizer classes.
The implementation should reposition the children using the current total size available to the sizer (m_size) and the size computed by the last call to #calc_min. Note that you should never call this method directly, call Sizer#layout instead if you need to manually update the sizer elements positions. This method is only called by wxWidgets itself.
140 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 140 def reposition_children(minSize) end |
#set_cols(cols) ⇒ void Also known as: cols=
This method returns an undefined value.
Sets the number of columns in the sizer.
107 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 107 def set_cols(cols) end |
#set_h_gap(gap) ⇒ void Also known as: h_gap=
This method returns an undefined value.
Sets the horizontal gap (in pixels) between cells in the sizer.
113 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 113 def set_h_gap(gap) end |
#set_rows(rows) ⇒ void Also known as: rows=
This method returns an undefined value.
Sets the number of rows in the sizer.
119 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 119 def set_rows(rows) end |
#set_v_gap(gap) ⇒ void Also known as: v_gap=
This method returns an undefined value.
Sets the vertical gap (in pixels) between the cells in the sizer.
125 |
# File 'lib/wx/doc/gen/grid_sizer.rb', line 125 def set_v_gap(gap) end |