Table.tableA widget containing widgets in a fixed number of rows and columns. It specialises Container.container to store children widgets in arrays.
inherit Stk.Container.containerresize ~rows ~columns resizes table. No need to repack widgets remaining in the new range of rows and columns. Other widgets are unpacked.
method children : child option array arraymethod children_widgets : Stk.Widget.widget option array arraymethod child_widget_at : row:int -> column:int -> Stk.Widget.widget optionmethod child_at : row:int -> column:int -> child optionmethod widget_pos : Stk.Widget.widget -> position optionmethod pack : ?pos:position ->
?row_span:int ->
?column_span:int ->
?hexpand:int ->
?vexpand:int ->
?hfill:bool ->
?vfill:bool ->
?data:Stk.Container.child_data ->
Stk.Widget.widget ->
unito#pack w adds widget w to o. Optional parameters are:
pos, a pair (row,column) indicates a position to insert w; default is to pack w to the first empty table cell.hexpand (resp. vexpand) sets Props.hexpand (resp. Props.vexpand) property of w to the given value.hfill (resp. vfill) sets Props.hfill (resp. Props.vfill) property of w to the given value.row_span (resp. column_span) sets row_span (resp. column_span properties of w to the given value. Default is to set to 1.data associates the given value to w. All data associated to children must have the same type (this type is the type parameter of class table.To allocate space for table cells, the same algorithm as in Box.box.pack is applied, but handling both horizontal and vertical sizes and expand values of each widget.
method unpack : Stk.Widget.widget -> unito#unpack w removes child widget w from o.
o#unpack_at ~row ~columns removes child widget w at given position, if any. destroy indicates whether to call #destroy on children after removing.