Hello,
I have an wxWindow. Inside there I've got a wxBoxSize (Vertical). The sizer has 3 child controls.
I want to be able to hide one of the three child controls, and have the sizer and its parent automaticly resize. For example when I hide one child control of the sizer, the window decreases by 200 pixels.
Right now my method of showing hiding certain controls, and resizing the window looks like this: (Hardcoded, fugly)
void GenUIAanleverOptionsDialog::OnToggleButtonShowLabels( wxCommandEvent& event )
{
if(this->btnShowLabels->GetValue())
{
this->pnlInfoLabels->Show(true);
this->SetSize(this->GetSize().GetWidth(), 573);
}
else
{
this->pnlInfoLabels->Show(false);
this->SetSize(this->GetSize().GetWidth(), 294);
}
}