Control rpeinting when scrollin

Kit Bishop kit at bishop.net.nz
Sat Apr 28 23:10:57 PDT 2007


First, the necessary environment info:
OS: Windows XP, SP2
Compiler: Visual C++ 2005
wxWidgets: 2.8.2 as supplied with wxDev-C++ 6.10.2

Also, same problem with gcc  3.4.2 as supplied with with MingW 3.4.2 as 
supplied with wxDev-C++ 6.10.2

Now the problem:

I have a wxFrame (constructed with wxFormBuilder 3.00.18) that has the 
following general form:

wxFrame
+---wxBoxSizer (vertical)
    +---wxPanel, no wxEXPAND
    +---wxScrolledWindow, wxEXPAND, proportion =1
    |   +---wxBoxSizer (vertical)
    |       +---various wxBoxSizers and wxStaticBoxSizers each
    |           containing various controls and sizer
    +---wxPanel, no wxExpand

In general, everything work fine: resizing frame, scrolling the scrolled 
portion etc. - but there is one problem:

If I maximize the main frame, some of the controls within the scrolled 
window get redrawn in the wrong place.  This only happens if before 
maximizing, the frame is sized such that the scroll bars are showing and 
it is scrolled away from the initial position.  After restoring from 
maximized state, there is some corruption around the drawing of the 
controls that were misplaced when maximized.  I have tried all sorts of 
options using wxFULL_REPAINT_ON_RESIZE but it seems to make no difference.

Is this a known issues? Is there any known work around?

Thanks in advance.

Best regards,
Kit Bishop





More information about the wx-users mailing list