General theory question:
I've been tasked with updating some legacy code. One of the things I want to do is make the frame scrollable. However, I'm stuck on a bit of a problem, in that I can't inherit wxScrolledWindow, because the code in question already uses a custom frame class that extends wxFrame. Written in psuedo-code, what I've got on my hands is
CustomFrame: wxFrame mainFrame
mainFrame has a single, normal, wxPanel mainPanel. In that mainPanel is a single wxNotebook with a bunch of tabs.
So all i want is scrollbars to pop up if I resize the window. Except I can't extend the CustomFrame class to add wxScrolledWindow (the simple solution) without dealing with the usual mess of multiple inheritance problems.
All I want here is a single set of scrollbars, on the main frame that contains the notebook. I know how to code one from scratch, but I'd prefer a solution that doesn't involve massively reworking the main classes of this project.
In specific: the way the whole project is setup is in an Init() function for mainFrame (not in the constructor, that would be logical), first is created the mainPanel, as part of mainFrame, then the wxNotebook (as part of mainPanel). And like I said, I can't extend the mainFrame class to use wxScrolledWindow.
Question about scrollbars
Re: Question about scrollbars
Ah, came up with a cheap workaround.
Replaced the mainPanel with a wxScrolledWindow. It scrolls the area that needs it.
Replaced the mainPanel with a wxScrolledWindow. It scrolls the area that needs it.