I wrote some code snippet like this
if (control)
{
// Check if it's already enabled (either by default or previously set)
if (!control->IsDoubleBuffered())
{
control->SetDoubleBuffered(true);
}
// Always a good idea to bind this if you're still seeing "white flashes"
control->Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent& event) {
// Leave empty to prevent background clearing
});
}
I set the breakpoint inside the "if (!control->IsDoubleBuffered())" clause, and I see it hit there. So, under wx 3.3.2, the double buffer is not enabled by default, so calling the "control->SetDoubleBuffered(true);" will enable it.
in fact, it is not redrawn until I release the mouse button
OK, I see such option, it is an option for Windows OS's graphics system to reduce the flicker.