I'm not setting any sizes explicitly, the wxScrolledWindow is a child of a wxPanel.
As a quick hack I thought I could turn off the horizontal scrollbar:
Code: Select all
new wxScrolledWindow(this,-1,wxDefaultPosition,wxDefaultSize,wxVSCROLL);
Here is my code - SettingsPanel is a subclass of wxPanel:
Code: Select all
SettingsPanel::SettingsPanel( wxWindow* parent ) : wxPanel(parent)
{
wxBoxSizer *settingsSizer = new wxBoxSizer(wxVERTICAL);
settingsScrollWindow = new wxScrolledWindow(this,-1,wxDefaultPosition,wxDefaultSize,wxVSCROLL);
settingsScrollWindow->SetScrollRate( 10, 10 );
settingsScrollSizer = new wxBoxSizer(wxVERTICAL);
settingsScrollWindow->SetSizer(settingsScrollSizer);
.
. //add controls to the scroll window here
.
settingsSizer->Add(settingsScrollWindow,1,wxEXPAND);
SetSizer(settingsSizer);
}
I just either want the H-scrollbar to be disabled, or to leave space for the V-scrollbar in the width. I would settle for the V-scroll being always visible or something - after an easy quick fix only here that avoids a dumb H-scroll that scrolls about 10px