.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.GenericStaticBitmap:
==========================================================================================================================================
|phoenix_title| **wx.GenericStaticBitmap**
==========================================================================================================================================
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.
If you want to display larger images portably, you may use generic implementation GenericStaticBitmap declared in
Inheritance diagram for class GenericStaticBitmap:
`
**__init__** `(self)`
Default constructor.
:rtype: `None`
:html:`
`
**__init__** `(self, parent, id=ID_ANY, bitmap=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`: wx.Window
:param `id`: Control identifier. A value of -1 denotes a default value.
:type `id`: wx.WindowID
:param `bitmap`:
:type `bitmap`: wx.BitmapBundle
:param `pos`: Window position.
:type `pos`: wx.Point
:param `size`: Window size.
:type `size`: wx.Size
:param `style`: Window style. See :ref:`wx.StaticBitmap`.
:type `style`: long
:param `name`: Window name.
:type `name`: string
Bitmap label.
:rtype: `None`
.. seealso:: :meth:`Create`
:html:`
`
.. method:: Create(self, parent, id=ID_ANY, bitmap=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBitmapNameStr)
Creation function, for two-step construction.
For details see :ref:`wx.StaticBitmap`.
:param `parent`:
:type `parent`: wx.Window
:param `id`:
:type `id`: wx.WindowID
:param `bitmap`:
:type `bitmap`: wx.BitmapBundle
:param `pos`:
:type `pos`: wx.Point
:param `size`:
:type `size`: wx.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:`wx.Bitmap`
.. seealso:: :meth:`SetBitmap`
.. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)
:param `variant`:
:type `variant`: wx.WindowVariant
:rtype: :ref:`wx.VisualAttributes`
.. 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:`wx.StaticBitmap.SetBitmap` ).
:rtype: :ref:`wx.Icon`
.. seealso:: :meth:`SetIcon`
.. method:: GetScaleMode(self)
Returns the scale mode currently used in the control.
:rtype: :ref:`wx.GenericStaticBitmap.ScaleMode`
.. versionadded:: 4.1/wxWidgets-3.1.0
.. seealso:: :meth:`SetScaleMode`
.. method:: SetBitmap(self, label)
Sets the bitmap label.
:param `label`: The new bitmap.
:type `label`: wx.BitmapBundle
:rtype: `None`
.. seealso:: :meth:`GetBitmap`
.. method:: SetIcon(self, label)
Sets the label to the given icon.
:param `label`: The new icon.
:type `label`: wx.Icon
:rtype: `None`
.. method:: SetScaleMode(self, scaleMode)
Sets the scale mode.
:param `scaleMode`: Controls how the bitmap is scaled inside the control.
:type `scaleMode`: wx.GenericStaticBitmap.ScaleMode
:rtype: `None`
.. versionadded:: 4.1/wxWidgets-3.1.0
.. note::
Currently only the generic implementation supports all scaling modes. You may use generic implementation GenericStaticBitmap declared in