wx.aui.AuiToolBar¶ wx.aui.AuiToolBar is a dockable toolbar, part of the AUI class framework.
See also AUI Overview.
Window Styles¶This class supports the following styles:
wx.aui.AUI_TB_TEXT:wx.aui.AUI_TB_NO_TOOLTIPS:wx.aui.AUI_TB_NO_AUTORESIZE:wx.aui.AUI_TB_GRIPPER:wx.aui.AUI_TB_OVERFLOW:wx.aui.AUI_TB_VERTICAL: using this style forces the toolbar to be vertical and be only dockable to the left or right sides of the window whereas by default it can be horizontal or vertical and be docked anywherewx.aui.AUI_TB_HORZ_LAYOUT:wx.aui.AUI_TB_HORIZONTAL: analogous to wx.aui.AUI_TB_VERTICAL, but forces the toolbar to be horizontalwx.aui.AUI_TB_PLAIN_BACKGROUND: Draw a plain background (based on parent) instead of the default gradient background.wx.aui.AUI_TB_HORZ_TEXT: Equivalent to wx.aui.AUI_TB_HORZ_LAYOUT | wx.aui.AUI_TB_TEXTwx.aui.AUI_TB_DEFAULT_STYLE: The default is to have no styles
Events Emitted by this Class¶Handlers bound for the following event types will receive a wx.aui.AuiToolBarEvent parameter.
Methods Summary¶
Properties Summary¶
Class API¶wx.aui.AuiToolBar(Control)¶Possible constructors:
AuiToolBar()
AuiToolBar(parent, id=ID_ANY, position=DefaultPosition,
size=DefaultSize, style=AUI_TB_DEFAULT_STYLE)
AuiToolBar is a dockable toolbar, part of the AUI class framework.
__init__(self, *args, **kw)¶__init__ (self)
Default constructor, use Create later.
New in version 2.9.5.
__init__ (self, parent, id=ID_ANY, position=DefaultPosition, size=DefaultSize, style=AUI_TB_DEFAULT_STYLE)
Constructor creating and initializing the object.
| Parameters: |
|---|
AddControl(self, control, label="")¶| Parameters: |
|
|---|---|
| Return type: |
AddLabel(self, tool_id, label="", width=-1)¶| Parameters: |
|
|---|---|
| Return type: |
AddSeparator(self)¶| Return type: | wx.aui.AuiToolBarItem |
|---|
AddSpacer(self, pixels)¶| Parameters: | pixels (int) – |
|---|---|
| Return type: | wx.aui.AuiToolBarItem |
AddStretchSpacer(self, proportion=1)¶| Parameters: | proportion (int) – |
|---|---|
| Return type: | wx.aui.AuiToolBarItem |
AddTool(self, *args, **kw)¶AddTool (self, tool_id, label, bitmap, short_help_string=””, kind=ITEM_NORMAL)
| Parameters: | |
|---|---|
| Return type: |
AddTool (self, tool_id, label, bitmap, disabled_bitmap, kind, short_help_string, long_help_string, client_data)
| Parameters: | |
|---|---|
| Return type: |
AddTool (self, tool_id, bitmap, disabled_bitmap, toggle=False, client_data=None, short_help_string=””, long_help_string=””)
| Parameters: | |
|---|---|
| Return type: |
Clear(self)¶ClearTools(self)¶Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=AUI_TB_DEFAULT_STYLE)¶Really create wx.aui.AuiToolBar created using default constructor.
| Parameters: | |
|---|---|
| Return type: | bool |
New in version 2.9.5.
DeleteByIndex(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | bool |
DeleteTool(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | bool |
EnableTool(self, tool_id, state)¶| Parameters: |
|
|---|
FindControl(self, window_id)¶| Parameters: | window_id (int) – |
|---|---|
| Return type: | Control |
FindTool(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | wx.aui.AuiToolBarItem |
FindToolByIndex(self, idx)¶| Parameters: | idx (int) – |
|---|---|
| Return type: | wx.aui.AuiToolBarItem |
FindToolByPosition(self, x, y)¶| Parameters: |
|
|---|---|
| Return type: |
GetArtProvider(self)¶| Return type: | wx.aui.AuiToolBarArt |
|---|
GetGripperVisible(self)¶| Return type: | bool |
|---|
GetHintSize(self, dock_direction)¶get size of hint rectangle for a particular dock location
| Parameters: | dock_direction (int) – |
|---|---|
| Return type: | Size |
GetOverflowVisible(self)¶| Return type: | bool |
|---|
GetToolBarFits(self)¶| Return type: | bool |
|---|
GetToolBitmap(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | Bitmap |
GetToolBitmapSize(self)¶| Return type: | Size |
|---|
GetToolBorderPadding(self)¶| Return type: | int |
|---|
GetToolCount(self)¶| Return type: | int |
|---|
GetToolDropDown(self, tool_id)¶Returns whether the specified toolbar item has an associated drop down button.
| Parameters: | tool_id (int) – |
|---|---|
| Return type: | bool |
See also
GetToolEnabled(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | bool |
GetToolFits(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | bool |
GetToolFitsByIndex(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | bool |
GetToolIndex(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | int |
GetToolLabel(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | string |
GetToolLongHelp(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | string |
GetToolPacking(self)¶| Return type: | int |
|---|
GetToolPos(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | int |
GetToolProportion(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | int |
GetToolRect(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | Rect |
GetToolSeparation(self)¶| Return type: | int |
|---|
GetToolShortHelp(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | string |
GetToolSticky(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | bool |
GetToolTextOrientation(self)¶| Return type: | int |
|---|
GetToolToggled(self, tool_id)¶| Parameters: | tool_id (int) – |
|---|---|
| Return type: | bool |
GetWindowStyleFlag(self)¶Gets the window style that was passed to the constructor or Create method.
GetWindowStyle is another name for the same function.
| Return type: | long |
|---|
IsPaneValid(self, pane)¶| Parameters: | pane (wx.aui.AuiPaneInfo) – |
|---|---|
| Return type: | bool |
Realize(self)¶| Return type: | bool |
|---|
SetArtProvider(self, art)¶| Parameters: | art (wx.aui.AuiToolBarArt) – |
|---|
SetCustomOverflowItems(self, prepend, append)¶| Parameters: |
|
|---|
SetFont(self, font)¶Sets the font for this window.
This function should not be called for the parent window if you don’t want its font to be inherited by its children, use SetOwnFont instead in this case and see InheritAttributes for more explanations.
Please notice that the given font is not automatically used for wx.PaintDC objects associated with this window, you need to call wx.DC.SetFont too. However this font is used by any standard controls for drawing their text as well as by GetTextExtent .
| Parameters: | font (wx.Font) – Font to associate with this window, pass NullFont to reset to the default font. |
|---|---|
| Return type: | bool |
| Returns: | True if the font was really changed, False if it was already set to this font and nothing was done. |
See also
GetFont , InheritAttributes
SetGripperVisible(self, visible)¶| Parameters: | visible (bool) – |
|---|
SetMargins(self, *args, **kw)¶SetMargins (self, size)
| Parameters: | size (wx.Size) – |
|---|
SetMargins (self, x, y)
| Parameters: |
|
|---|
SetMargins (self, left, right, top, bottom)
| Parameters: |
|
|---|
SetOverflowVisible(self, visible)¶| Parameters: | visible (bool) – |
|---|
SetToolBorderPadding(self, padding)¶| Parameters: | padding (int) – |
|---|
SetToolDropDown(self, tool_id, dropdown)¶Set whether the specified toolbar item has a drop down button.
This is only valid for wx.ITEM_NORMAL tools.
| Parameters: |
|
|---|
See also
SetToolLabel(self, tool_id, label)¶| Parameters: |
|
|---|
SetToolLongHelp(self, tool_id, help_string)¶| Parameters: |
|
|---|
SetToolPacking(self, packing)¶| Parameters: | packing (int) – |
|---|
SetToolProportion(self, tool_id, proportion)¶| Parameters: |
|
|---|
SetToolSeparation(self, separation)¶| Parameters: | separation (int) – |
|---|
SetToolShortHelp(self, tool_id, help_string)¶| Parameters: |
|
|---|
SetToolSticky(self, tool_id, sticky)¶| Parameters: |
|
|---|
SetToolTextOrientation(self, orientation)¶| Parameters: | orientation (int) – |
|---|
SetWindowStyleFlag(self, style)¶Sets the style of the window.
Please note that some styles cannot be changed after the window creation and that Refresh might need to be called after changing the others for the change to take place immediately.
See Window styles for more information about flags.
| Parameters: | style (long) – |
|---|
See also
ToggleTool(self, tool_id, state)¶| Parameters: |
|
|---|
ArtProvider¶See GetArtProvider and SetArtProvider
GripperVisible¶See GetGripperVisible and SetGripperVisible
OverflowVisible¶See GetOverflowVisible and SetOverflowVisible
ToolBarFits¶See GetToolBarFits
ToolBitmapSize¶See GetToolBitmapSize and SetToolBitmapSize
ToolBorderPadding¶ToolCount¶See GetToolCount
ToolPacking¶See GetToolPacking and SetToolPacking
ToolSeparation¶See GetToolSeparation and SetToolSeparation
ToolTextOrientation¶WindowStyleFlag¶See GetWindowStyleFlag and SetWindowStyleFlag