[wxGTK]wxRichEditCtrl the function PaintBackground () does not
work
Vadim Zeitlin
vadim at wxwidgets.org
Thu Dec 20 04:13:24 PST 2007
On Thu, 20 Dec 2007 08:29:59 -0300 Mauro Cordon <mcordon at gmail.com> wrote:
MC> In Class wxRichEditCtrl the function PaintBackground () does not work.
MC> Someone help me?
MC>
MC> ---
MC> class MyRichEdit : public wxRichEditCtrl
MC> {
MC> ...
MC> void PaintBackground(wxDC &dc) { dc.SetBackground( *wxRED_BRUSH ); };
MC> };
AFAICS it works in the sense that it does exactly what you do in it, that
is nothing. What do you expect your code to do anyhow? Setting background
brush is not enough, you need to actually draw something with it. Or call
the base class version doing it.
Besides, if you just want to change the background colour to red I'd
rather call SetBackgroundColour(*wxRED) than override this virtual
function.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list