wxRuby Documentation Home

Wx::GBSizerItem

The GBSizerItem class is used by the
GridBagSizer for tracking the items in the
sizer. It adds grid position and spanning information to the normal
SizerItem by adding
GBPosition and GBSpan
attrbibutes. Most of the time you will not need to use a
GBSizerItem directly in your code, but there are a couple of cases
where it is handy.

Derived from

SizerItem

Methods

GBSizerItem.new

GBSizerItem.new(%(arg-type)Integer% width, Integer height, GBPosition pos, GBSpan span, Integer flag, Integer border, Object userData)

Construct a sizer item for tracking a spacer.

GBSizerItem.new(%(arg-type)Window% window, GBPosition pos, GBSpan span, Integer flag, Integer border, Object userData)

Construct a sizer item for tracking a window.

GBSizerItem.new(%(arg-type)Sizer% sizer, GBPosition pos, GBSpan span, Integer flag, Integer border, Object userData)

Construct a sizer item for tracking a subsizer.

GBSizerItem#get_end_pos

get_end_pos(%(arg-type)Integer% row, Integer col)

Get the row and column of the endpoint of this item

GBSizerItem#get_pos

GBPosition get_pos() get_pos(%(arg-type)Integer% row, Integer col)

Get the grid position of the item.

GBSizerItem#get_span

GBSpan get_span() get_span(%(arg-type)Integer% rowspan, Integer colspan)

Get the row and column spanning of the item.

GBSizerItem#intersects

Boolean intersects(%(arg-type)GBSizerItem% other)

Returns true if this item and the other item instersect

Boolean intersects(%(arg-type)GBPosition% pos, GBSpan span)

Returns true if the given pos/span would intersect with this item.

GBSizerItem#set_pos

Boolean set_pos(%(arg-type)GBPosition% pos)

If the item is already a member of a sizer then first ensure that
there is no other item that would intersect with this one at the new
position, then set the new position. Returns true if the change is
successful and after the next Layout the item will be moved.

GBSizerItem#set_span

Boolean set_span(%(arg-type)GBSpan% span)

If the item is already a member of a sizer then first ensure that
there is no other item that would intersect with this one with its new
spanning size, then set the new spanning. Returns true if the change
is successful and after the next Layout the item will be resized.

[This page automatically generated from the Textile source at 2023-06-03 08:07:32 +0000]