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.
Return the bundle containing disabled tool bitmaps. |
|
Return the bundle containing normal tool bitmaps. |
|
Return the toolbar this tool is a member of. |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
wx.
ToolBarToolBase
(Object)¶Possible constructors:
ToolBarToolBase(tbar: Optional[ToolBar]=None, toolid: int=ID_SEPARATOR,
label: str='', bmpNormal: BitmapBundle=NullBitmap, bmpDisabled:
BitmapBundle=NullBitmap, kind: ItemKind=ITEM_NORMAL, clientData:
Optional[PyUserData]=None, shortHelpString: str='', longHelpString:
str='') -> None
ToolBarToolBase(tbar : ToolBar, control : Control, label : str) -> None
A toolbar tool represents one item on the toolbar.
__init__
(self, *args, **kw)¶__init__ (self, tbar: Optional[ToolBar]=None, toolid: int=ID_SEPARATOR, label: str=’’, bmpNormal: BitmapBundle=NullBitmap, bmpDisabled: BitmapBundle=NullBitmap, kind: ItemKind=ITEM_NORMAL, clientData: Optional[PyUserData]=None, shortHelpString: str=’’, longHelpString: str=’’)
tbar (wx.ToolBar) –
toolid (int) –
label (string) –
bmpNormal (wx.BitmapBundle) –
bmpDisabled (wx.BitmapBundle) –
kind (ItemKind) –
clientData (PyUserData) –
shortHelpString (string) –
longHelpString (string) –
None
__init__ (self, tbar : ToolBar, control : Control, label : str)
tbar (wx.ToolBar) –
control (wx.Control) –
label (string) –
None
Attach
(self, tbar : ToolBar)¶tbar (wx.ToolBar) –
None
CanBeToggled
(self)¶bool
Detach
(self)¶None
Enable
(self, enable : bool)¶enable (bool) –
bool
GetClientData
(self)¶PyUserData
GetControl
(self)¶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.
New in version 4.1/wxWidgets-3.1.6.
GetId
(self)¶int
GetKind
(self)¶GetLabel
(self)¶str
GetLongHelp
(self)¶str
GetNormalBitmapBundle
(self)¶Return the bundle containing normal tool bitmaps.
This bundle may be invalid if the tool doesn’t show a bitmap.
New in version 4.1/wxWidgets-3.1.6.
GetShortHelp
(self)¶str
GetStyle
(self)¶int
GetToolBar
(self)¶Return the toolbar this tool is a member of.
IsButton
(self)¶bool
IsControl
(self)¶bool
IsEnabled
(self)¶bool
IsSeparator
(self)¶bool
IsStretchable
(self)¶bool
IsStretchableSpace
(self)¶bool
IsToggled
(self)¶bool
MakeStretchable
(self)¶None
SetClientData
(self, clientData : PyUserData)¶clientData (PyUserData) –
None
SetDisabledBitmap
(self, bmp : BitmapBundle)¶bmp (wx.BitmapBundle) –
None
SetLabel
(self, label : str)¶label (string) –
None
SetLongHelp
(self, help : str)¶help (string) –
bool
SetNormalBitmap
(self, bmp : BitmapBundle)¶bmp (wx.BitmapBundle) –
None
SetShortHelp
(self, help : str)¶help (string) –
bool
SetToggle
(self, toggle : bool)¶toggle (bool) –
bool
Toggle
(self, *args, **kw)¶Toggle (self, toggle : bool)
toggle (bool) –
bool
Toggle (self)
None
ClientData
¶See GetClientData
and SetClientData
Control
¶See GetControl
DisabledBitmap
¶See GetDisabledBitmap
and SetDisabledBitmap
DisabledBitmapBundle
¶DropdownMenu
¶See GetDropdownMenu
and SetDropdownMenu
LongHelp
¶See GetLongHelp
and SetLongHelp
NormalBitmap
¶See GetNormalBitmap
and SetNormalBitmap
NormalBitmapBundle
¶ShortHelp
¶See GetShortHelp
and SetShortHelp
ToolBar
¶See GetToolBar