11
Development / Re: flicker when I rezize the Build log control(TextCtrlLogger) issue
« Last post by ollydbg on March 26, 2026, 01:38:18 pm » I wrote some code snippet like this
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.
Code
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.
Quote
in fact, it is not redrawn until I release the mouse buttonOK, I see such option, it is an option for Windows OS's graphics system to reduce the flicker.
Recent Posts