.. include:: headings.inc .. _ToolBarToolBase: ========================================================================================================================================== |phoenix_title| **ToolBarToolBase** ========================================================================================================================================== 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. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **ToolBarToolBase** .. raw:: html

Inheritance diagram of ToolBarToolBase

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~ToolBarToolBase.__init__` :meth:`~ToolBarToolBase.Attach` :meth:`~ToolBarToolBase.CanBeToggled` :meth:`~ToolBarToolBase.Detach` :meth:`~ToolBarToolBase.Enable` :meth:`~ToolBarToolBase.GetBitmap` :meth:`~ToolBarToolBase.GetClientData` :meth:`~ToolBarToolBase.GetControl` :meth:`~ToolBarToolBase.GetDisabledBitmap` :meth:`~ToolBarToolBase.GetDropdownMenu` :meth:`~ToolBarToolBase.GetId` :meth:`~ToolBarToolBase.GetKind` :meth:`~ToolBarToolBase.GetLabel` :meth:`~ToolBarToolBase.GetLongHelp` :meth:`~ToolBarToolBase.GetNormalBitmap` :meth:`~ToolBarToolBase.GetShortHelp` :meth:`~ToolBarToolBase.GetStyle` :meth:`~ToolBarToolBase.GetToolBar` :meth:`~ToolBarToolBase.IsButton` :meth:`~ToolBarToolBase.IsControl` :meth:`~ToolBarToolBase.IsEnabled` :meth:`~ToolBarToolBase.IsSeparator` :meth:`~ToolBarToolBase.IsStretchable` :meth:`~ToolBarToolBase.IsStretchableSpace` :meth:`~ToolBarToolBase.IsToggled` :meth:`~ToolBarToolBase.MakeStretchable` :meth:`~ToolBarToolBase.SetClientData` :meth:`~ToolBarToolBase.SetDisabledBitmap` :meth:`~ToolBarToolBase.SetDropdownMenu` :meth:`~ToolBarToolBase.SetLabel` :meth:`~ToolBarToolBase.SetLongHelp` :meth:`~ToolBarToolBase.SetNormalBitmap` :meth:`~ToolBarToolBase.SetShortHelp` :meth:`~ToolBarToolBase.SetToggle` :meth:`~ToolBarToolBase.Toggle` ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~ToolBarToolBase.Bitmap` See :meth:`~ToolBarToolBase.GetBitmap` :attr:`~ToolBarToolBase.ClientData` See :meth:`~ToolBarToolBase.GetClientData` and :meth:`~ToolBarToolBase.SetClientData` :attr:`~ToolBarToolBase.Control` See :meth:`~ToolBarToolBase.GetControl` :attr:`~ToolBarToolBase.DisabledBitmap` See :meth:`~ToolBarToolBase.GetDisabledBitmap` and :meth:`~ToolBarToolBase.SetDisabledBitmap` :attr:`~ToolBarToolBase.DropdownMenu` See :meth:`~ToolBarToolBase.GetDropdownMenu` and :meth:`~ToolBarToolBase.SetDropdownMenu` :attr:`~ToolBarToolBase.Id` See :meth:`~ToolBarToolBase.GetId` :attr:`~ToolBarToolBase.Kind` See :meth:`~ToolBarToolBase.GetKind` :attr:`~ToolBarToolBase.Label` See :meth:`~ToolBarToolBase.GetLabel` and :meth:`~ToolBarToolBase.SetLabel` :attr:`~ToolBarToolBase.LongHelp` See :meth:`~ToolBarToolBase.GetLongHelp` and :meth:`~ToolBarToolBase.SetLongHelp` :attr:`~ToolBarToolBase.NormalBitmap` See :meth:`~ToolBarToolBase.GetNormalBitmap` and :meth:`~ToolBarToolBase.SetNormalBitmap` :attr:`~ToolBarToolBase.ShortHelp` See :meth:`~ToolBarToolBase.GetShortHelp` and :meth:`~ToolBarToolBase.SetShortHelp` :attr:`~ToolBarToolBase.Style` See :meth:`~ToolBarToolBase.GetStyle` :attr:`~ToolBarToolBase.ToolBar` See :meth:`~ToolBarToolBase.GetToolBar` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ToolBarToolBase(Object) A toolbar tool represents one item on the toolbar. **Possible constructors**:: ToolBarToolBase(tbar=None, toolid=ID_SEPARATOR, label='', bmpNormal=NullBitmap, bmpDisabled=NullBitmap, kind=ITEM_NORMAL, clientData=None, shortHelpString='', longHelpString='') ToolBarToolBase(tbar, control, label) .. method:: __init__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__init__** `(self, tbar=None, toolid=ID_SEPARATOR, label='', bmpNormal=NullBitmap, bmpDisabled=NullBitmap, kind=ITEM_NORMAL, clientData=None, shortHelpString='', longHelpString='')` :param `tbar`: :type `tbar`: ToolBarBase :param `toolid`: :type `toolid`: int :param `label`: :type `label`: string :param `bmpNormal`: :type `bmpNormal`: Bitmap :param `bmpDisabled`: :type `bmpDisabled`: Bitmap :param `kind`: :type `kind`: ItemKind :param `clientData`: :type `clientData`: PyUserData :param `shortHelpString`: :type `shortHelpString`: string :param `longHelpString`: :type `longHelpString`: string **~~~** **__init__** `(self, tbar, control, label)` :param `tbar`: :type `tbar`: ToolBarBase :param `control`: :type `control`: Control :param `label`: :type `label`: string **~~~** .. method:: Attach(self, tbar) :param `tbar`: :type `tbar`: ToolBarBase .. method:: CanBeToggled(self) :rtype: `bool` .. method:: Detach(self) .. method:: Enable(self, enable) :param `enable`: :type `enable`: bool :rtype: `bool` .. method:: GetBitmap(self) :rtype: :ref:`Bitmap` .. method:: GetClientData(self) :rtype: `PyUserData` .. method:: GetControl(self) :rtype: :ref:`Control` .. method:: GetDisabledBitmap(self) :rtype: :ref:`Bitmap` .. method:: GetDropdownMenu(self) :rtype: :ref:`Menu` .. method:: GetId(self) :rtype: `int` .. method:: GetKind(self) :rtype: :ref:`ItemKind` .. method:: GetLabel(self) :rtype: `string` .. method:: GetLongHelp(self) :rtype: `string` .. method:: GetNormalBitmap(self) :rtype: :ref:`Bitmap` .. method:: GetShortHelp(self) :rtype: `string` .. method:: GetStyle(self) :rtype: `int` .. method:: GetToolBar(self) :rtype: `ToolBarBase` .. method:: IsButton(self) :rtype: `bool` .. method:: IsControl(self) :rtype: `bool` .. method:: IsEnabled(self) :rtype: `bool` .. method:: IsSeparator(self) :rtype: `bool` .. method:: IsStretchable(self) :rtype: `bool` .. method:: IsStretchableSpace(self) :rtype: `bool` .. method:: IsToggled(self) :rtype: `bool` .. method:: MakeStretchable(self) .. method:: SetClientData(self, clientData) :param `clientData`: :type `clientData`: PyUserData .. method:: SetDisabledBitmap(self, bmp) :param `bmp`: :type `bmp`: Bitmap .. method:: SetDropdownMenu(self, menu) :param `menu`: :type `menu`: Menu .. method:: SetLabel(self, label) :param `label`: :type `label`: string .. method:: SetLongHelp(self, help) :param `help`: :type `help`: string :rtype: `bool` .. method:: SetNormalBitmap(self, bmp) :param `bmp`: :type `bmp`: Bitmap .. method:: SetShortHelp(self, help) :param `help`: :type `help`: string :rtype: `bool` .. method:: SetToggle(self, toggle) :param `toggle`: :type `toggle`: bool :rtype: `bool` .. method:: Toggle(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **Toggle** `(self, toggle)` :param `toggle`: :type `toggle`: bool :rtype: `bool` **~~~** **Toggle** `(self)` **~~~** .. attribute:: Bitmap See :meth:`~ToolBarToolBase.GetBitmap` .. attribute:: ClientData See :meth:`~ToolBarToolBase.GetClientData` and :meth:`~ToolBarToolBase.SetClientData` .. attribute:: Control See :meth:`~ToolBarToolBase.GetControl` .. attribute:: DisabledBitmap See :meth:`~ToolBarToolBase.GetDisabledBitmap` and :meth:`~ToolBarToolBase.SetDisabledBitmap` .. attribute:: DropdownMenu See :meth:`~ToolBarToolBase.GetDropdownMenu` and :meth:`~ToolBarToolBase.SetDropdownMenu` .. attribute:: Id See :meth:`~ToolBarToolBase.GetId` .. attribute:: Kind See :meth:`~ToolBarToolBase.GetKind` .. attribute:: Label See :meth:`~ToolBarToolBase.GetLabel` and :meth:`~ToolBarToolBase.SetLabel` .. attribute:: LongHelp See :meth:`~ToolBarToolBase.GetLongHelp` and :meth:`~ToolBarToolBase.SetLongHelp` .. attribute:: NormalBitmap See :meth:`~ToolBarToolBase.GetNormalBitmap` and :meth:`~ToolBarToolBase.SetNormalBitmap` .. attribute:: ShortHelp See :meth:`~ToolBarToolBase.GetShortHelp` and :meth:`~ToolBarToolBase.SetShortHelp` .. attribute:: Style See :meth:`~ToolBarToolBase.GetStyle` .. attribute:: ToolBar See :meth:`~ToolBarToolBase.GetToolBar`