The child window is initially displayed correctly. As well, during dragging, the newly exposed parts of the child window are painting correctly. However, parts already displayed are not repainted.
My code relevant to painting, for the child window, currently consists of an empty EVT_ERASE_BACKGROUND handler:
Code: Select all
void SizeableTextCtrl::onEraseBackground (wxEraseEvent& WXUNUSED(event))
{
}
Code: Select all
void SizeableTextCtrl::onPaint (wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc (this);
dc.DestroyClippingRegion();
wxRect rect = GetRect();
dc.SetPen (*wxRED);
dc.SetBrush (*wxYELLOW);
dc.DrawRectangle (0, 0, rect.width, rect.height);
}
I've also tried putting this code in onEraseBackground, but I get the same effect.
Thanks.