wxButtons with Image Flicker on Frame Resize.
Posted: Sun Sep 16, 2018 12:52 pm
I have several wxButtons placed on wxFrame for which I set Bitmap images.
The problem is when I resize the wxFrame, all the buttons wit bitmap flicker a lot.
I found this guide here: https://wiki.wxwidgets.org/Flicker-Free_Drawing and used inside wxFrame's constructor but that didn't solve it.
One thing I noticed that I am not using wxPanel for wxFrame on which buttons are placed. Would that solve it?
Code: Select all
wxBitmap Bitmap1(....)
m_button1 = new wxButton(this, BUTTON1_ID, wxT(""), wxDefaultPosition, wxDefaultSize, wxTRANSPARENT_WINDOW | wxBORDER_NONE);
m_button1->SetBitmap(Bitmap1);
I found this guide here: https://wiki.wxwidgets.org/Flicker-Free_Drawing and used
Code: Select all
SetDoubleBuffered(true);
One thing I noticed that I am not using wxPanel for wxFrame on which buttons are placed. Would that solve it?