wx.aui.AuiToolBarItem¶
wx.aui.AuiToolBarItem is part of the AUI class framework, representing a toolbar element.
See also wx.aui.AuiToolBar and AUI Overview.
It has a unique id (except for the separators which always have id = -1), the style (telling whether it is a normal button, separator or a control), the state (toggled or not, enabled or not) and short and long help strings. The default implementations use the short help string for the tooltip text which is popped up when the mouse pointer enters the tool and the long help string for the applications status bar (currently not implemented).
Class Hierarchy¶
Methods Summary¶
Default Constructor. |
|
Assigns the properties of the wx.aui.AuiToolBarItem “c” to this. |
|
Returns whether the toolbar item can be toggled. |
|
Returns the toolbar item identifier. |
|
Returns the toolbar item kind. |
|
Gets the current state of the toolbar item. |
|
Returns the Window associated to the toolbar item. |
|
Returns whether the toolbar item has an associated drop down button. |
|
Set whether this tool has a drop down button. |
|
Sets the toolbar item identifier. |
|
Sets the wx.aui.AuiToolBarItem kind. |
|
Set the current state of the toolbar item. |
|
Assigns a window to the toolbar item. |
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
Class API¶
- class wx.aui.AuiToolBarItem(object)¶
Possible constructors:
AuiToolBarItem() -> None AuiToolBarItem(c) -> None
AuiToolBarItem is part of the
AUIclass framework, representing a toolbar element.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self)
Default Constructor.
- Return type:
None
__init__ (self, c)
Assigns the properties of the wx.aui.AuiToolBarItem “c” to this.
- Parameters:
- Return type:
None
- Assign(self, c)¶
Assigns the properties of the wx.aui.AuiToolBarItem “c” to this.
- Parameters:
- Return type:
None
- CanBeToggled(self)¶
Returns whether the toolbar item can be toggled.
- Return type:
bool
Added in version 4.1/wxWidgets-3.1.5.
- GetAlignment(self)¶
- Return type:
int
- GetId(self)¶
Returns the toolbar item identifier.
- Return type:
int
- GetKind(self)¶
Returns the toolbar item kind.
- Return type:
int
- Returns:
one of
ITEM_NORMAL,ITEM_CHECKorITEM_RADIO,ITEM_SEPARATOR,ITEM_CONTROL,ITEM_SPACER,ITEM_LABEL,
- GetLabel(self)¶
- Return type:
str
- GetLongHelp(self)¶
- Return type:
str
- GetMinSize(self)¶
- Return type:
Size
- GetProportion(self)¶
- Return type:
int
- GetShortHelp(self)¶
- Return type:
str
- GetSpacerPixels(self)¶
- Return type:
int
- GetState(self)¶
Gets the current state of the toolbar item.
- Return type:
int
- Returns:
an or’d combination of flags from AuiPaneButtonState representing the current state
- GetUserData(self)¶
- Return type:
int
- HasDropDown(self)¶
Returns whether the toolbar item has an associated drop down button.
- Return type:
bool
- IsActive(self)¶
- Return type:
bool
- IsSticky(self)¶
- Return type:
bool
- SetActive(self, b)¶
- Parameters:
b (bool)
- Return type:
None
- SetAlignment(self, l)¶
- Parameters:
l (int)
- Return type:
None
- SetBitmap(self, bmp)¶
- Parameters:
bmp (wx.BitmapBundle)
- Return type:
None
- SetDisabledBitmap(self, bmp)¶
- Parameters:
bmp (wx.BitmapBundle)
- Return type:
None
- SetHasDropDown(self, b)¶
Set whether this tool has a drop down button.
This is only valid for
wx.ITEM_NORMALtools.- Parameters:
b (bool)
- Return type:
None
- SetHoverBitmap(self, bmp)¶
- Parameters:
bmp (wx.BitmapBundle)
- Return type:
None
- SetId(self, new_id)¶
Sets the toolbar item identifier.
- Parameters:
new_id (int)
- Return type:
None
- SetKind(self, new_kind)¶
Sets the wx.aui.AuiToolBarItem kind.
- Parameters:
new_kind (int)
- Return type:
None
- SetLabel(self, s)¶
- Parameters:
s (string)
- Return type:
None
- SetLongHelp(self, s)¶
- Parameters:
s (string)
- Return type:
None
- SetProportion(self, p)¶
- Parameters:
p (int)
- Return type:
None
- SetShortHelp(self, s)¶
- Parameters:
s (string)
- Return type:
None
- SetSizerItem(self, s)¶
- Parameters:
s (wx.SizerItem)
- Return type:
None
- SetSpacerPixels(self, s)¶
- Parameters:
s (int)
- Return type:
None
- SetState(self, new_state)¶
Set the current state of the toolbar item.
- Parameters:
new_state (int) – is an or’d combination of flags from AuiPaneButtonState
- Return type:
None
- SetSticky(self, b)¶
- Parameters:
b (bool)
- Return type:
None
- SetUserData(self, l)¶
- Parameters:
l (long)
- Return type:
None
- SetWindow(self, w)¶
Assigns a window to the toolbar item.
- Parameters:
w (wx.Window)
- Return type:
None
Properties¶
- Alignment¶
See
GetAlignmentandSetAlignment
- DisabledBitmap¶
See
GetDisabledBitmapandSetDisabledBitmap
- HoverBitmap¶
See
GetHoverBitmapandSetHoverBitmap
- LongHelp¶
See
GetLongHelpandSetLongHelp
- MinSize¶
See
GetMinSizeandSetMinSize
- Proportion¶
See
GetProportionandSetProportion
- ShortHelp¶
See
GetShortHelpandSetShortHelp
- SizerItem¶
See
GetSizerItemandSetSizerItem
- SpacerPixels¶
See
GetSpacerPixelsandSetSpacerPixels
- UserData¶
See
GetUserDataandSetUserData
