wxButton *button2 = new wxButton( panel, wxID_ANY, _T("Hallo") );
panelsizer->Add( button2, 0, wxALIGN_RIGHT | wxLEFT|wxRIGHT|wxBOTTOM, 30 );
- panel->SetAutoLayout( true );
panel->SetSizer( panelsizer );
// Tell dialog to use sizer
- SetSizer( topsizer );
- topsizer->SetSizeHints( this );
+ SetSizerAndFit( topsizer );
}
// ----------------------------------------------------------------------------
m_target = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80, wxDefaultCoord ) );
main_sizer->Add( m_target, 1, wxALL|wxGROW, 5 );
- SetSizer( main_sizer);
-
- Layout();
- GetSizer()->Fit( this );
- GetSizer()->SetSizeHints( this );
+ SetSizerAndFit( main_sizer);
}
root->Add( ps_bottom, 1, wxEXPAND | wxALL, 5 );
// Set sizer for window
- SetSizer( root );
- root->Fit( this );
- root->SetSizeHints( this );
+ SetSizerAndFit( root );
}