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

Type SizerItem

object --+    
         |    
    Object --+
             |
            SizerItem

Known Subclasses:
GBSizerItem

The wx.SizerItem class is used to track the position, size and other attributes of each item managed by a wx.Sizer. It is not usually necessary to use this class because the sizer elements can also be identified by their positions or window or sizer references but sometimes it may be more convenient to use wx.SizerItem directly. Also, custom classes derived from wx.PySizer will probably need to use the collection of wx.SizerItems held by wx.Sizer when calculating layout.


See Also:

wx.Sizer, wx.GBSizerItem

Method Summary
SizerItem __init__(self)
Constructs an empty wx.SizerItem.
  __del__(self)
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.
  GetHGrow(self)
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.
  GetVGrow(self)
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.
  SetHGrow(self, proportion)
  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.
  SetVGrow(self, proportion)
  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.

Property Summary
  Border: See GetBorder and SetBorder
  Flag: See GetFlag and SetFlag
  MinSize: See GetMinSize
  MinSizeWithBorder: See GetMinSizeWithBorder
  Position: See GetPosition
  Proportion: See GetProportion and SetProportion
  Ratio: See GetRatio and SetRatio
  Rect: See GetRect
  Size: See GetSize
  Sizer: See GetSizer and SetSizer
  Spacer: See GetSpacer and SetSpacer
  thisown: The membership flag
  UserData: See GetUserData and SetUserData
  Window: See GetWindow and SetWindow

Method Details

__init__(self)
(Constructor)

Constructs an empty wx.SizerItem. Either a window, sizer or spacer size will need to be set before this item can be used in a Sizer.

You will probably never need to create a wx.SizerItem directly as they are created automatically when the sizer's Add, Insert or Prepend methods are called.

Returns:
SizerItem
Overrides:
wx.Object.__init__

See Also:

wx.SizerItemSpacer, wx.SizerItemWindow, wx.SizerItemSizer

CalcMin(self)

Calculates the minimum desired size for the item, including any space needed by borders.

Returns:
Size

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.

GetBorder(self)

Get the border value for this item.

Returns:
int

GetFlag(self)

Get the flag value for this item.

Returns:
int

GetMinSize(self)

Get the minimum size needed for the item.

Returns:
Size

GetMinSizeWithBorder(self)

Get the minimum size needed for the item with space for the borders added, if needed.

Returns:
Size

GetOption(*args, **kwargs)

Please use GetProportion instead.

GetPosition(self)

Returns the current position of the item, as set in the last Layout.

Returns:
Point

GetProportion(self)

Get the proportion value for this item.

Returns:
int

GetRatio(self)

Set the ratio item attribute.

Returns:
float

GetRect(self)

Returns the rectangle that the sizer item should occupy

Returns:
Rect

GetSize(self)

Get the current size of the item, as set in the last Layout.

Returns:
Size

GetSizer(self)

Get the subsizer (if any) that is managed by this sizer item.

Returns:
Sizer

GetSpacer(self)

Get the size of the spacer managed by this sizer item.

Returns:
Size

GetUserData(self)

Returns the userData associated with this sizer item, or None if there isn't any.

Returns:
PyObject

GetWindow(self)

Get the window (if any) that is managed by this sizer item.

Returns:
Window

IsShown(self)

Is the item to be shown in the layout?

Returns:
bool

IsSizer(self)

Is this sizer item a subsizer?

Returns:
bool

IsSpacer(self)

Is this sizer item a spacer?

Returns:
bool

IsWindow(self)

Is this sizer item a window?

Returns:
bool

SetBorder(self, border)

Set the border value for this item.

Parameters:
border
           (type=int)

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.

Parameters:
pos
           (type=Point)

size
           (type=Size)

SetFlag(self, flag)

Set the flag value for this item.

Parameters:
flag
           (type=int)

SetOption(*args, **kwargs)

Please use SetProportion instead.

SetProportion(self, proportion)

Set the proportion value for this item.

Parameters:
proportion
           (type=int)

SetRatio(self, ratio)

Set the ratio item attribute.

Parameters:
ratio
           (type=float)

SetRatioSize(self, size)

Set the ratio item attribute.

Parameters:
size
           (type=Size)

SetRatioWH(self, width, height)

Set the ratio item attribute.

Parameters:
width
           (type=int)

height
           (type=int)

SetSizer(self, sizer)

Set the subsizer to be managed by this sizer item.

Parameters:
sizer
           (type=Sizer)

SetSpacer(self, size)

Set the size of the spacer to be managed by this sizer item.

Parameters:
size
           (type=Size)

SetUserData(self, userData)

Associate a Python object with this sizer item.

Parameters:
userData
           (type=PyObject)

SetWindow(self, window)

Set the window to be managed by this sizer item.

Parameters:
window
           (type=Window)

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. If the item is tracking a window then it is shown or hidden as needed.

Parameters:
show
           (type=bool)


Property Details

Border

See GetBorder and SetBorder

Get Method:
GetBorder(self)
Set Method:
SetBorder(self, border)

Flag

See GetFlag and SetFlag

Get Method:
GetFlag(self)
Set Method:
SetFlag(self, flag)

MinSize

See GetMinSize

Get Method:
GetMinSize(self)

MinSizeWithBorder

See GetMinSizeWithBorder

Get Method:
GetMinSizeWithBorder(self)

Position

See GetPosition

Get Method:
GetPosition(self)

Proportion

See GetProportion and SetProportion

Get Method:
GetProportion(self)
Set Method:
SetProportion(self, proportion)

Ratio

See GetRatio and SetRatio

Get Method:
GetRatio(self)
Set Method:
SetRatio(self, ratio)

Rect

See GetRect

Get Method:
GetRect(self)

Size

See GetSize

Get Method:
GetSize(self)

Sizer

See GetSizer and SetSizer

Get Method:
GetSizer(self)
Set Method:
SetSizer(self, sizer)

Spacer

See GetSpacer and SetSpacer

Get Method:
GetSpacer(self)
Set Method:
SetSpacer(self, size)

thisown

The membership flag

UserData

See GetUserData and SetUserData

Get Method:
GetUserData(self)
Set Method:
SetUserData(self, userData)

Window

See GetWindow and SetWindow

Get Method:
GetWindow(self)
Set Method:
SetWindow(self, window)

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:54:08 2009 http://epydoc.sf.net