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.
Bitmap |
See GetBitmap |
ClientData |
See GetClientData and SetClientData |
Control |
See GetControl |
DisabledBitmap |
See GetDisabledBitmap and SetDisabledBitmap |
DropdownMenu |
See GetDropdownMenu and SetDropdownMenu |
Id |
See GetId |
Kind |
See GetKind |
Label |
See GetLabel and SetLabel |
LongHelp |
See GetLongHelp and SetLongHelp |
NormalBitmap |
See GetNormalBitmap and SetNormalBitmap |
ShortHelp |
See GetShortHelp and SetShortHelp |
Style |
See GetStyle |
ToolBar |
See GetToolBar |
wx.
ToolBarToolBase
(Object)¶Possible constructors:
ToolBarToolBase(tbar=None, toolid=ID_SEPARATOR, label="",
bmpNormal=NullBitmap, bmpDisabled=NullBitmap, kind=ITEM_NORMAL,
clientData=None, shortHelpString="",
longHelpString="")
ToolBarToolBase(tbar, control, label)
A toolbar tool represents one item on the toolbar.
__init__
(self, *args, **kw)¶__init__ (self, tbar=None, toolid=ID_SEPARATOR, label=””, bmpNormal=NullBitmap, bmpDisabled=NullBitmap, kind=ITEM_NORMAL, clientData=None, shortHelpString=””, longHelpString=””)
Parameters: |
|
---|
__init__ (self, tbar, control, label)
Parameters: |
|
---|
Attach
(self, tbar)¶Parameters: | tbar (wx.ToolBar) – |
---|
CanBeToggled
(self)¶Return type: | bool |
---|
Detach
(self)¶Enable
(self, enable)¶Parameters: | enable (bool) – |
---|---|
Return type: | bool |
GetClientData
(self)¶Return type: | PyUserData |
---|
GetControl
(self)¶Return type: | wx.Control |
---|
GetId
(self)¶Return type: | int |
---|
GetKind
(self)¶Return type: | wx.ItemKind |
---|
GetLabel
(self)¶Return type: | string |
---|
GetLongHelp
(self)¶Return type: | string |
---|
GetShortHelp
(self)¶Return type: | string |
---|
GetStyle
(self)¶Return type: | int |
---|
GetToolBar
(self)¶Return the toolbar this tool is a member of.
Return type: | wx.ToolBar |
---|
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)¶SetClientData
(self, clientData)¶Parameters: | clientData (PyUserData) – |
---|
SetLabel
(self, label)¶Parameters: | label (string) – |
---|
SetLongHelp
(self, help)¶Parameters: | help (string) – |
---|---|
Return type: | bool |
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)
ClientData
¶See GetClientData
and SetClientData
Control
¶See GetControl
DisabledBitmap
¶See GetDisabledBitmap
and SetDisabledBitmap
DropdownMenu
¶See GetDropdownMenu
and SetDropdownMenu
LongHelp
¶See GetLongHelp
and SetLongHelp
NormalBitmap
¶See GetNormalBitmap
and SetNormalBitmap
ShortHelp
¶See GetShortHelp
and SetShortHelp
ToolBar
¶See GetToolBar