Page 1 of 1

wxScrolledWindow is Getting Covered by a Gray Box

Posted: Thu Apr 13, 2017 4:44 pm
by ColleenKobe
I'm asking this question on the wxCrafter forum because I'm using wxCrafter to create my program.

I want to create a scrolling window containing a 3 x 3 grid sizer. The grid sizer contains controls such as wxButtons.

I've created a wxScrollingWindow, the box sizer inside it, and nine wxButtons, one button per cell. But when I build and run what I have, the resulting display appears to have a gray box overlaying the buttons of the scrolling window. At the right side, you can see two little up-and-down arrows, which I assume is for scrolling up and down. See the screen shot below.
wxScrolledWindow Shot 2.jpg
What is causing the gray box overlaying the wxScrollingWindow?
How do I get rid of the gray box?

Thanks in advance!

Software Versions:
CodeLite: 10.0.0
wxCrafter: 2.6
wxWidgets: 3.1.0

Re: wxScrolledWindow is Getting Covered by a Gray Box

Posted: Thu Apr 13, 2017 5:33 pm
by eranif
I believe that the problem is that the wxScrolledWindow is not "expanded" fully in the wxFrame.
The "gray" colour that you see is the default wxFrame background colour, this means that the wxScrolledWindow does not expand properly.
To fix this, click on the "m_scrollWin11" item in the tree view, and then in the designer, enable the tool icon that has a green arrows pointing up and right (with the tooltip that says: "Set sizer proportion to 1")

Re: wxScrolledWindow is Getting Covered by a Gray Box

Posted: Thu Apr 13, 2017 5:56 pm
by ColleenKobe
You were right! My program is beautiful and perfect. Thank you, Eran!

Happy Colleen