This class represents a toolbar item.
__init__ |
Default class constructor. |
Enable |
Enables or disables the tool. |
GetBitmap |
Returns the tool bitmap. |
GetCustomControl |
Returns the associated custom control. |
GetDisabledBitmap |
Returns the tool disabled bitmap. |
GetGroup |
Returns group id for radio item, or -1 for other item types. |
GetId |
Gets the tool id. |
GetLabel |
Returns the tool label. |
GetLongHelp |
Returns the tool long help string (displayed in the parent frame StatusBar ). |
GetShortHelp |
Returns the tool short help string (displayed in the tool’s tooltip). |
IsChecked |
Same as IsSelected . More intuitive for check items though. |
IsCheckItem |
Returns True if the item is a radio item. |
IsCustomControl |
Returns whether the tool is a custom control or not. |
IsEnabled |
Returns whether the tool is enabled or not. |
IsRadioItem |
Returns True if the item is a radio item. |
IsRegularItem |
Returns whether the tool is a standard tool or not. |
IsSelected |
Returns whether the tool is selected or checked. |
IsSeparator |
Returns whether the tool is a separator or not. |
Select |
Selects or checks a radio or check item. |
SetBitmap |
Sets the tool bitmap. |
SetDisabledBitmap |
Sets the tool disabled bitmap. |
SetGroup |
Sets group id for a radio item, for other items does nothing. |
SetLabel |
Sets the tool label. |
SetLongHelp |
Sets the tool long help string (displayed in the parent frame StatusBar ). |
SetShortHelp |
Sets the tool short help string (displayed in the tool’s tooltip). |
Toggle |
Toggles a check item. |
FlatToolbarItem
(object)¶This class represents a toolbar item.
__init__
(self, controlType=None, id=wx.ID_ANY, label="", disabledBmp=wx.NullBitmap, kind=wx.ITEM_NORMAL, shortHelp="", longHelp="")¶Default class constructor.
Parameters: |
|
---|
Enable
(self, enable=True)¶Enables or disables the tool.
Parameters: | enable (bool) – True to enable the tool, False to disable it. |
---|
GetBitmap
(self)¶Returns the tool bitmap.
GetCustomControl
(self)¶Returns the associated custom control.
GetDisabledBitmap
(self)¶Returns the tool disabled bitmap.
GetGroup
(self)¶Returns group id for radio item, or -1 for other item types.
GetId
(self)¶Gets the tool id.
GetLabel
(self)¶Returns the tool label.
GetLongHelp
(self)¶Returns the tool long help string (displayed in the parent frame StatusBar
).
GetShortHelp
(self)¶Returns the tool short help string (displayed in the tool’s tooltip).
IsChecked
(self)¶Same as IsSelected
. More intuitive for check items though.
IsCheckItem
(self)¶Returns True
if the item is a radio item.
IsCustomControl
(self)¶Returns whether the tool is a custom control or not.
IsEnabled
(self)¶Returns whether the tool is enabled or not.
IsRadioItem
(self)¶Returns True
if the item is a radio item.
IsRegularItem
(self)¶Returns whether the tool is a standard tool or not.
IsSelected
(self)¶Returns whether the tool is selected or checked.
IsSeparator
(self)¶Returns whether the tool is a separator or not.
Select
(self, select=True)¶Selects or checks a radio or check item.
Parameters: | select (bool) – True to select or check a tool, False to unselect
or uncheck it. |
---|
SetBitmap
(self, bmp)¶Sets the tool bitmap.
Parameters: | bmp – the new tool bitmap, a valid wx.Bitmap object. |
---|
SetDisabledBitmap
(self, bmp)¶Sets the tool disabled bitmap.
Parameters: | bmp – the new tool disabled bitmap, a valid wx.Bitmap object. |
---|
SetGroup
(self, group)¶Sets group id for a radio item, for other items does nothing.
Parameters: | group – an instance of FlatMenuItemGroup . |
---|
SetLabel
(self, label)¶Sets the tool label.
Parameters: | label (string) – the new tool string. |
---|
SetLongHelp
(self, help)¶Sets the tool long help string (displayed in the parent frame StatusBar
).
Parameters: | help (string) – the new tool long help string. |
---|
SetShortHelp
(self, help)¶Sets the tool short help string (displayed in the tool’s tooltip).
Parameters: | help (string) – the new tool short help string. |
---|
Toggle
(self)¶Toggles a check item.