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 anywhere
wx.aui.AUI_TB_HORZ_LAYOUT:
wx.aui.AUI_TB_HORIZONTAL: analogous to wx.aui.AUI_TB_VERTICAL, but forces the toolbar to be horizontal
wx.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_TEXT
wx.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.
EVT_AUITOOLBAR_TOOL_DROPDOWN: Process a wxEVT_AUITOOLBAR_TOOL_DROPDOWN event
EVT_AUITOOLBAR_OVERFLOW_CLICK: Process a wxEVT_AUITOOLBAR_OVERFLOW_CLICK event
EVT_AUITOOLBAR_RIGHT_CLICK: Process a wxEVT_AUITOOLBAR_RIGHT_CLICK event
EVT_AUITOOLBAR_MIDDLE_CLICK: Process a wxEVT_AUITOOLBAR_MIDDLE_CLICK event
EVT_AUITOOLBAR_BEGIN_DRAG: Process a wxEVT_AUITOOLBAR_BEGIN_DRAG event
Class Hierarchy¶
Inheritance diagram for class AuiToolBar:
Methods Summary¶Default constructor, use |
|
Really create wx.aui.AuiToolBar created using default constructor. |
|
get size of hint rectangle for a particular dock location |
|
Returns whether the specified toolbar item has an associated drop down button. |
|
Gets the window style that was passed to the constructor or |
|
Sets the font for this window. |
|
Set whether the specified toolbar item has a drop down button. |
|
Sets the style of the window. |
|
Properties Summary¶See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Class API¶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)
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.
control (wx.Control) –
label (string) –
tool_id (int) –
label (string) –
width (int) –
pixels (int) –
proportion (int) –
AddTool (self, tool_id, label, bitmap, short_help_string=””, kind=ITEM_NORMAL)
AddTool (self, tool_id, label, bitmap, disabled_bitmap, kind, short_help_string, long_help_string, client_data)
AddTool (self, tool_id, bitmap, disabled_bitmap, toggle=False, client_data=None, short_help_string=””, long_help_string=””)
Really create wx.aui.AuiToolBar created using default constructor.
bool
New in version 2.9.5.
tool_id (int) –
bool
tool_id (int) –
bool
tool_id (int) –
state (bool) –
window_id (int) –
Control
tool_id (int) –
idx (int) –
x (int) –
y (int) –
variant (WindowVariant) –
VisualAttributes
bool
get size of hint rectangle for a particular dock location
dock_direction (int) –
Size
bool
bool
tool_id (int) –
Bitmap
Size
int
int
Returns whether the specified toolbar item has an associated drop down button.
tool_id (int) –
bool
See also
tool_id (int) –
bool
tool_id (int) –
bool
tool_id (int) –
bool
tool_id (int) –
int
tool_id (int) –
string
tool_id (int) –
string
int
tool_id (int) –
int
tool_id (int) –
int
tool_id (int) –
Rect
int
tool_id (int) –
string
tool_id (int) –
bool
int
tool_id (int) –
bool
Gets the window style that was passed to the constructor or Create method.
GetWindowStyle is another name for the same function.
long
pane (wx.aui.AuiPaneInfo) –
bool
bool
art (wx.aui.AuiToolBarArt) –
prepend (AuiToolBarItemArray) –
append (AuiToolBarItemArray) –
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 .
font (wx.Font) – Font to associate with this window, pass NullFont to reset to the default font.
bool
True if the font was really changed, False if it was already set to this font and nothing was done.
See also
GetFont , InheritAttributes
visible (bool) –
SetMargins (self, size)
size (wx.Size) –
SetMargins (self, x, y)
x (int) –
y (int) –
SetMargins (self, left, right, top, bottom)
left (int) –
right (int) –
top (int) –
bottom (int) –
visible (bool) –
padding (int) –
Set whether the specified toolbar item has a drop down button.
This is only valid for wx.ITEM_NORMAL tools.
tool_id (int) –
dropdown (bool) –
See also
tool_id (int) –
label (string) –
tool_id (int) –
help_string (string) –
packing (int) –
tool_id (int) –
proportion (int) –
separation (int) –
tool_id (int) –
help_string (string) –
tool_id (int) –
sticky (bool) –
orientation (int) –
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.
style (long) –
See also
tool_id (int) –
state (bool) –
See GetArtProvider and SetArtProvider
See GetGripperVisible and SetGripperVisible
See GetOverflowVisible and SetOverflowVisible
See GetToolBarFits
See GetToolBitmapSize and SetToolBitmapSize
See GetToolCount
See GetToolPacking and SetToolPacking
See GetToolSeparation and SetToolSeparation
See GetWindowStyleFlag and SetWindowStyleFlag