Adding scrollbar to a frame

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
victornguyen
In need of some credit
In need of some credit
Posts: 1
Joined: Sun Jan 13, 2019 4:25 pm

Adding scrollbar to a frame

Postby victornguyen » Sun Jan 13, 2019 4:32 pm

Hello all, I have an application that has a frame, this frame is composed of different controls attached to it. These controls are wxPanel. By point, the frame size got larger and larger and I need to add a scrollbar to it where it should be effective on the panels attached to it. Any advice on how to do this? I found the addpane method which gives the scrollbar for free but this would require changing many things so I thought about asking here first..

User avatar
doublemax
Moderator
Moderator
Posts: 12889
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Adding scrollbar to a frame

Postby doublemax » Sun Jan 13, 2019 5:44 pm

Add a wxScrolledWindow as the only child of the wxFrame. Then create all controls as children of the wxScrolledWindow.
Use the source, Luke!


Return to “C++ Development”

Who is online

Users browsing this forum: Google [Bot] and 13 guests