************* wx.EraseEvent ************* Inheritance diagram for `wx.EraseEvent`: | .. inheritance-diagram:: wx.EraseEvent | Description =========== An erase event is sent when a window's background needs to be repainted. On some platforms, such as GTK+, this event is simulated (simply generated just before the paint event) and may cause flicker. It is therefore recommended that you set the text background colour explicitly in order to prevent flicker. The default background colour under GTK+ is grey. To intercept this event, use the ``wx.EVT_ERASE_BACKGROUND`` macro in an event table definition. You must call `GetDC <#GetDC>`_ and use the returned device context if it is not ``None``. If it is ``None``, create your own temporary `wx.ClientDC <../Widgets/wx.ClientDC.html>`_ object. Derived From ^^^^^^^^^^^^^ * `wx.Event `_ * `wx.Object <../Widgets/wx.Object.html>`_ Event Handling ^^^^^^^^^^^^^^ ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_ERASE_BACKGROUND(func) Process a ``wx.wxEVT_ERASE_BACKGROUND`` event. ================================================== ================================================== Remarks ^^^^^^^ Use the device context returned by `GetDC <#GetDC>`_ to draw on, don't create a `wx.PaintDC <../Widgets/wx.PaintDC.html>`_ in the event handler. Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetDC <#GetDC>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `DC <#DC>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(Id=0, dc=None) Constructor. **Parameters:** * `Id` (int) * `dc` (`wx.DC <../Widgets/wx.DC.html>`_) | **Returns:** `wx.EraseEvent `_ -------- .. method:: GetDC() Returns the device context associated with the erase event to draw on. | **Returns:** `wx.DC <../Widgets/wx.DC.html>`_ -------- Properties ^^^^^^^^^^ .. attribute:: DC See `GetDC <#GetDC>`_