.. 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

.. module:: wx.lib.statbmp

.. currentmodule:: wx.lib.statbmp

.. highlight:: python



.. _wx.lib.statbmp:

==========================================================================================================================================
|phoenix_title|  **wx.lib.statbmp**
==========================================================================================================================================

:class:`GenStaticBitmap` is a generic implementation of :class:`wx.StaticBitmap`.


Description
===========

:class:`GenStaticBitmap` is a generic implementation of
:class:`wx.StaticBitmap`.

Some of the platforms supported by wxPython (most notably GTK), do not
consider :class:`wx.StaticBitmap` as a separate widget; instead, the bitmap is
just drawn on its parent window. This essentially bars the use of almost all
mouse events (such as detection of mouse motions, mouse clicks and so on) on
the widget.

Using :class:`GenStaticBitmap` will overcome the problems described above, as
it is a generic widget and a real window on its own.


Usage
=====

Sample usage::

    import wx
    import wx.lib.statbmp as SB

    app = wx.App(0)

    frame = wx.Frame(None, -1, "wx.lib.statbmp Test")
    panel = wx.Panel(frame)

    bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, wx.ART_OTHER, (16, 16))
    st1 = SB.GenStaticBitmap(panel, -1, bmp, (20, 10))

    bmp = wx.ArtProvider.GetBitmap(wx.ART_WARNING, wx.ART_OTHER, (32, 32))
    st2 = SB.GenStaticBitmap(panel, -1, bmp, (20, 60))

    frame.Show()
    app.MainLoop()


|class_summary| Classes Summary
===============================

================================================================================ ================================================================================
`~wx.lib.statbmp.GenStaticBitmap`                                                :class:`GenStaticBitmap` is a generic implementation of :class:`wx.StaticBitmap`.
================================================================================ ================================================================================


|


.. toctree::
   :maxdepth: 1
   :hidden:

   wx.lib.statbmp.GenStaticBitmap