Package wx :: Class GBSizerItem
[frames | no frames]

Type GBSizerItem

object --+        
         |        
    Object --+    
             |    
     SizerItem --+
                 |
                GBSizerItem


The wx.GBSizerItem class is used to track the additional data about items in a wx.GridBagSizer such as the item's position in the grid and how many rows or columns it spans.


Method Summary
GBSizerItem __init__(self)
Constructs an empty wx.GBSizerItem.
  __repr__(self)
GBPosition GetEndPos(self)
Get the row and column of the endpoint of this item.
GridBagSizer GetGBSizer(self)
Get the sizer this item is a member of.
GBPosition GetPos(self)
Get the grid position of the item
  GetPosTuple(self)
GBSpan GetSpan(self)
Get the row and column spanning of the item
  GetSpanTuple(self)
bool Intersects(self, other)
Returns True if this item and the other item instersect.
bool IntersectsPos(self, pos, span)
Returns True if the given pos/span would intersect with this item.
  SetGBSizer(self, sizer)
Set the sizer this item is a member of.
bool SetPos(self, 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.
bool SetSpan(self, 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.
    Inherited from SizerItem
Size CalcMin(self)
Calculates the minimum desired size for the item, including any space needed by borders.
  DeleteWindows(self)
Destroy the window or the windows in a subsizer, depending on the type of item.
  DetachSizer(self)
Enable deleting the SizerItem without destroying the contained sizer.
int GetBorder(self)
Get the border value for this item.
int GetFlag(self)
Get the flag value for this item.
Size GetMinSize(self)
Get the minimum size needed for the item.
Size GetMinSizeWithBorder(self)
Get the minimum size needed for the item with space for the borders added, if needed.
  GetOption(*args, **kwargs)
Please use GetProportion instead.
Point GetPosition(self)
Returns the current position of the item, as set in the last Layout.
int GetProportion(self)
Get the proportion value for this item.
float GetRatio(self)
Set the ratio item attribute.
Rect GetRect(self)
Returns the rectangle that the sizer item should occupy
Size GetSize(self)
Get the current size of the item, as set in the last Layout.
Sizer GetSizer(self)
Get the subsizer (if any) that is managed by this sizer item.
Size GetSpacer(self)
Get the size of the spacer managed by this sizer item.
PyObject GetUserData(self)
Returns the userData associated with this sizer item, or None if there isn't any.
Window GetWindow(self)
Get the window (if any) that is managed by this sizer item.
bool IsShown(self)
Is the item to be shown in the layout?
bool IsSizer(self)
Is this sizer item a subsizer?
bool IsSpacer(self)
Is this sizer item a spacer?
bool IsWindow(self)
Is this sizer item a window?
  SetBorder(self, border)
Set the border value for this item.
  SetDimension(self, pos, size)
Set the position and size of the space allocated for this item by the sizer, and adjust the position and size of the item (window or subsizer) to be within that space taking alignment and borders into account.
  SetFlag(self, flag)
Set the flag value for this item.
  SetInitSize(self, x, y)
  SetOption(*args, **kwargs)
Please use SetProportion instead.
  SetProportion(self, proportion)
Set the proportion value for this item.
  SetRatio(self, ratio)
Set the ratio item attribute.
  SetRatioSize(self, size)
Set the ratio item attribute.
  SetRatioWH(self, width, height)
Set the ratio item attribute.
  SetSizer(self, sizer)
Set the subsizer to be managed by this sizer item.
  SetSpacer(self, size)
Set the size of the spacer to be managed by this sizer item.
  SetUserData(self, userData)
Associate a Python object with this sizer item.
  SetWindow(self, window)
Set the window to be managed by this sizer item.
  Show(self, show)
Set the show item attribute, which sizers use to determine if the item is to be made part of the layout or not.
    Inherited from Object
  Destroy(self)
Deletes the C++ object this Python object is a proxy for.
String GetClassName(self)
Returns the class name of the C++ class using wxRTTI.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Method Details

__init__(self)
(Constructor)

Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer size will need to be set, as well as a position and span before this item can be used in a Sizer.

You will probably never need to create a wx.GBSizerItem directly as they are created automatically when the sizer's Add method is called.

Returns:
GBSizerItem
Overrides:
wx.SizerItem.__init__

GetEndPos(self)

Get the row and column of the endpoint of this item.

Returns:
GBPosition

GetGBSizer(self)

Get the sizer this item is a member of.

Returns:
GridBagSizer

GetPos(self)

Get the grid position of the item

Returns:
GBPosition

GetSpan(self)

Get the row and column spanning of the item

Returns:
GBSpan

Intersects(self, other)

Returns True if this item and the other item instersect.

Parameters:
other
           (type=GBSizerItem)

Returns:
bool

IntersectsPos(self, pos, span)

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

Parameters:
pos
           (type=GBPosition)

span
           (type=GBSpan)

Returns:
bool

SetGBSizer(self, sizer)

Set the sizer this item is a member of.

Parameters:
sizer
           (type=GridBagSizer)

SetPos(self, 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.

Parameters:
pos
           (type=GBPosition)

Returns:
bool

SetSpan(self, 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.

Parameters:
span
           (type=GBSpan)

Returns:
bool

Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 16:44:58 2007 http://epydoc.sf.net