.. include:: headings.inc .. _StaticBitmap: ========================================================================================================================================== |phoenix_title| **StaticBitmap** ========================================================================================================================================== A static bitmap control displays a bitmap. Native implementations on some platforms are only meant for display of the small icons in the dialog boxes. In particular, under Windows 9x the size of bitmap is limited to 6464 pixels. If you want to display larger images portably, you may use generic implementation GenericStaticBitmap declared in . .. seealso:: :ref:`StaticBitmap`, :ref:`StaticBox` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **StaticBitmap** .. raw:: html

Inheritance diagram of StaticBitmap

| |appearance| Control Appearance =============================== | .. figure:: _static/images/widgets/fullsize/wxmsw/staticbitmap.png :alt: wxMSW :figclass: floatleft **wxMSW** .. figure:: _static/images/widgets/fullsize/wxmac/staticbitmap.png :alt: wxMAC :figclass: floatright **wxMAC** .. figure:: _static/images/widgets/fullsize/wxgtk/staticbitmap.png :alt: wxGTK :figclass: floatcenter **wxGTK** | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~StaticBitmap.__init__` Default constructor. :meth:`~StaticBitmap.Create` Creation function, for two-step construction. :meth:`~StaticBitmap.GetBitmap` Returns the bitmap currently used in the control. :meth:`~StaticBitmap.GetIcon` Returns the icon currently used in the control. :meth:`~StaticBitmap.SetBitmap` Sets the bitmap label. :meth:`~StaticBitmap.SetIcon` Sets the label to the given icon. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~StaticBitmap.Bitmap` See :meth:`~StaticBitmap.GetBitmap` and :meth:`~StaticBitmap.SetBitmap` :attr:`~StaticBitmap.Icon` See :meth:`~StaticBitmap.GetIcon` and :meth:`~StaticBitmap.SetIcon` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: StaticBitmap(Control) A static bitmap control displays a bitmap. **Possible constructors**:: StaticBitmap() StaticBitmap(parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBitmapNameStr) .. method:: __init__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__init__** `(self)` Default constructor. **~~~** **__init__** `(self, parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBitmapNameStr)` Constructor, creating and showing a static bitmap control. :param `parent`: Parent window. Should not be ``None``. :type `parent`: Window :param `id`: Control identifier. A value of -1 denotes a default value. :type `id`: int :param `label`: Bitmap label. :type `label`: Bitmap :param `pos`: Window position. :type `pos`: Point :param `size`: Window size. :type `size`: Size :param `style`: Window style. See :ref:`StaticBitmap`. :type `style`: long :param `name`: Window name. :type `name`: string .. seealso:: :meth:`Create` **~~~** .. method:: Create(self, parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBitmapNameStr) Creation function, for two-step construction. For details see :ref:`StaticBitmap` . :param `parent`: :type `parent`: Window :param `id`: :type `id`: int :param `label`: :type `label`: Bitmap :param `pos`: :type `pos`: Point :param `size`: :type `size`: Size :param `style`: :type `style`: long :param `name`: :type `name`: string :rtype: `bool` .. method:: GetBitmap(self) Returns the bitmap currently used in the control. Notice that this method can be called even if :meth:`SetIcon` had been used. :rtype: :ref:`Bitmap` .. seealso:: :meth:`SetBitmap` .. method:: GetIcon(self) Returns the icon currently used in the control. Notice that this method can only be called if :meth:`SetIcon` had been used: an icon can't be retrieved from the control if a bitmap had been set (using :meth:`StaticBitmap.SetBitmap` ). :rtype: :ref:`Icon` .. seealso:: :meth:`SetIcon` .. method:: SetBitmap(self, label) Sets the bitmap label. :param `label`: The new bitmap. :type `label`: Bitmap .. seealso:: :meth:`GetBitmap` .. method:: SetIcon(self, label) Sets the label to the given icon. :param `label`: The new icon. :type `label`: Icon .. attribute:: Bitmap See :meth:`~StaticBitmap.GetBitmap` and :meth:`~StaticBitmap.SetBitmap` .. attribute:: Icon See :meth:`~StaticBitmap.GetIcon` and :meth:`~StaticBitmap.SetIcon`