Hi list,
I have a problem regarding resized wxBitmapButtons. Briefly, I have a "matrix" of wxBitmapButtons like this:
frame
+--- main sizer
+--- main panel
+--- sizer 0
+--- custom wxBitmapButton
...........
+--- sizer n
+--- custom wxBitmapButton
When the frame is resized, if the number of rows/columns of custom wxBitmapButtons changes, I recalculate the layout, this meaning that all the custom wxBitmapButtons and their sizers are destroyed/removed and recreated (including the bitmaps for the buttons), then I do a GetSizer()->Layout() and draw all the custom wxBitmapButtons. When drawing the custom wxBitmapButtons I use GetClientSize().
The problem is that when the users resizes the frame too fast, the bitmaps of the custom wxBitmapButtons are either too large or too short. I.e. seems that GetClientSize() does not return the last size. A Refresh() for the custom wxBitmapButtons within onSize() does not help either.
I've tried the same thing with custom wxPanels instead of custom wxBitmapButtons and it worked just fine. What is wrong here, does anyone have any idea?
Thank you,
Cristina.