wx.ToolBarToolBase¶
A toolbar tool represents one item on the toolbar.
It has a unique id (except for the separators), 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.
Notice that the toolbar can not be modified by changing its tools via the (intentionally undocumented here) setter methods of this class, all the modifications must be done using the methods of wx.ToolBar itself.
Class Hierarchy¶
Methods Summary¶
Return the bundle containing disabled tool bitmaps. |
|
Return the bundle containing normal tool bitmaps. |
|
Return the toolbar this tool is a member of. |
|
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.ToolBarToolBase(Object)¶
Possible constructors:
ToolBarToolBase(tbar=None, toolid=ID_SEPARATOR, label='', bmpNormal=NullBitmap, bmpDisabled=NullBitmap, kind=ITEM_NORMAL, clientData=None, shortHelpString='', longHelpString='') -> None ToolBarToolBase(tbar, control, label) -> None
A toolbar tool represents one item on the toolbar.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self, tbar=None, toolid=ID_SEPARATOR, label=’’, bmpNormal=NullBitmap, bmpDisabled=NullBitmap, kind=ITEM_NORMAL, clientData=None, shortHelpString=’’, longHelpString=’’)
- Parameters:
tbar (wx.ToolBar)
toolid (int)
label (string)
bmpNormal (wx.BitmapBundle)
bmpDisabled (wx.BitmapBundle)
kind (ItemKind)
clientData (PyUserData)
shortHelpString (string)
longHelpString (string)
- Return type:
None
__init__ (self, tbar, control, label)
- Parameters:
tbar (wx.ToolBar)
control (wx.Control)
label (string)
- Return type:
None
- Attach(self, tbar)¶
- Parameters:
tbar (wx.ToolBar)
- Return type:
None
- CanBeToggled(self)¶
- Return type:
bool
- Detach(self)¶
- Return type:
None
- Enable(self, enable)¶
- Parameters:
enable (bool)
- Return type:
bool
- GetClientData(self)¶
- Return type:
PyUserData
- GetControl(self)¶
- Return type:
- GetDisabledBitmapBundle(self)¶
Return the bundle containing disabled tool bitmaps.
This bundle may be invalid if the tool doesn’t show a bitmap or doesn’t have a specific disabled bitmap creates one automatically from the normal bitmap.
- Return type:
Added in version 4.1/wxWidgets-3.1.6.
- GetId(self)¶
- Return type:
int
- GetKind(self)¶
- Return type:
- GetLabel(self)¶
- Return type:
str
- GetLongHelp(self)¶
- Return type:
str
- GetNormalBitmapBundle(self)¶
Return the bundle containing normal tool bitmaps.
This bundle may be invalid if the tool doesn’t show a bitmap.
- Return type:
Added in version 4.1/wxWidgets-3.1.6.
- GetShortHelp(self)¶
- Return type:
str
- GetStyle(self)¶
- Return type:
int
- GetToolBar(self)¶
Return the toolbar this tool is a member of.
- Return type:
- IsButton(self)¶
- Return type:
bool
- IsControl(self)¶
- Return type:
bool
- IsEnabled(self)¶
- Return type:
bool
- IsSeparator(self)¶
- Return type:
bool
- IsStretchable(self)¶
- Return type:
bool
- IsStretchableSpace(self)¶
- Return type:
bool
- IsToggled(self)¶
- Return type:
bool
- MakeStretchable(self)¶
- Return type:
None
- SetClientData(self, clientData)¶
- Parameters:
clientData (PyUserData)
- Return type:
None
- SetDisabledBitmap(self, bmp)¶
- Parameters:
bmp (wx.BitmapBundle)
- Return type:
None
- SetLabel(self, label)¶
- Parameters:
label (string)
- Return type:
None
- SetLongHelp(self, help)¶
- Parameters:
help (string)
- Return type:
bool
- SetNormalBitmap(self, bmp)¶
- Parameters:
bmp (wx.BitmapBundle)
- Return type:
None
- SetShortHelp(self, help)¶
- Parameters:
help (string)
- Return type:
bool
- SetToggle(self, toggle)¶
- Parameters:
toggle (bool)
- Return type:
bool
- Toggle(self, *args, **kw)¶
-
Toggle (self, toggle)
- Parameters:
toggle (bool)
- Return type:
bool
Toggle (self)
- Return type:
None
Properties¶
- ClientData¶
See
GetClientData
andSetClientData
- Control¶
See
GetControl
- DisabledBitmap¶
See
GetDisabledBitmap
andSetDisabledBitmap
- DisabledBitmapBundle¶
- DropdownMenu¶
See
GetDropdownMenu
andSetDropdownMenu
- LongHelp¶
See
GetLongHelp
andSetLongHelp
- NormalBitmap¶
See
GetNormalBitmap
andSetNormalBitmap
- NormalBitmapBundle¶
- ShortHelp¶
See
GetShortHelp
andSetShortHelp
- ToolBar¶
See
GetToolBar