1 \section{\class{wxEraseEvent
}}\label{wxeraseevent
}
3 An erase event is sent when a window's background needs to be repainted.
5 On some platforms, such as GTK+, this event is simulated (simply generated just before the
6 paint event) and may cause flicker. It is therefore recommended that
7 you set the text background colour explicitly in order to prevent flicker.
8 The default background colour under GTK+ is grey.
10 To intercept this event, use the EVT
\_ERASE\_BACKGROUND macro in an event table definition.
12 You must call wxEraseEvent::GetDC and use the returned device context if it is non-NULL.
13 If it is NULL, create your own temporary wxClientDC object.
15 \wxheading{Derived from
}
17 \helpref{wxEvent
}{wxevent
}\\
18 \helpref{wxObject
}{wxobject
}
20 \wxheading{Include files
}
26 \helpref{wxCore
}{librarieslist
}
28 \wxheading{Event table macros
}
30 To process an erase event, use this event handler macro to direct input to a member
31 function that takes a wxEraseEvent argument.
34 \begin{twocollist
}\itemsep=
0pt
35 \twocolitem{{\bf EVT
\_ERASE\_BACKGROUND(func)
}}{Process a wxEVT
\_ERASE\_BACKGROUND event.
}
40 Use the device context returned by
\helpref{GetDC
}{wxeraseeventgetdc
} to draw on,
41 don't create a wxPaintDC in the event handler.
45 %\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground},
46 \helpref{Event handling overview
}{eventhandlingoverview
}
48 \latexignore{\rtfignore{\wxheading{Members
}}}
50 \membersection{wxEraseEvent::wxEraseEvent
}\label{wxeraseeventctor
}
52 \func{}{wxEraseEvent
}{\param{int
}{id =
0},
\param{wxDC*
}{dc = NULL
}}
56 \membersection{wxEraseEvent::GetDC
}\label{wxeraseeventgetdc
}
58 \constfunc{wxDC*
}{GetDC
}{\void}
60 Returns the device context associated with the erase event to draw on.