Search code examples
linuxgccwxwidgets

wxWidgets Linux GCC, how to add scroll bar into wxFrame


My application has a GUI, it first reads a initialization file and then decides how many control objects (e.g., wxTextCtrl, wxToggleButton, etc.) need to be added to a wxFrame. When there are too many objects on the wxFrame, some objects are out of visible boundary, i.e., they are on the wxFrame, but user can not see them.

I am wondering whether it is possible to add a vertical and a horizontal scroll bar into wxFrame.

Thanks.


Solution

  • You should not add controls to a wxFrame. The wxFrame can be used to hold windows, including scrolled windows, on which controls can be placed.

    Take a look at some of the sample apps in the distribution to see how this works.