ok->SetDefault();
sizer->Add(ok, 0, wxALIGN_RIGHT | wxALL, 10);
- SetSizer(sizer);
- sizer->Fit(this);
+ SetSizerAndFit(sizer);
choice->SetSelection(6/*wxART_MESSAGE_BOX*/);
SetArtClient(wxART_MESSAGE_BOX);
// sizer
panel = new wxPanel(m_book);
- panel->SetAutoLayout( true );
wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(m_book, 1, wxEXPAND);
panel->SetSizer(sizer);
- sizer->Fit(this);
sizer->SetSizeHints(this);
}
buttonSizer->Add( bt, 0, wxALL, 2 );
topSizer->Add( buttonSizer, 0, wxALL|wxALIGN_RIGHT, 2 );
- SetSizer( topSizer );
- topSizer->Fit( this );
+ SetSizerAndFit( topSizer );
}
DnDShape *DnDShapeDialog::GetShape() const
sizer->Add(5,5);
sizer->Add(new wxButton(&dlg, wxID_OK, _("OK")), 0, wxALIGN_RIGHT | wxALL, 10);
- dlg.SetSizer(sizer);
- sizer->Fit(&dlg);
+ dlg.SetSizerAndFit(sizer);
dlg.Centre();
dlg.ShowModal();
sizerTop->Add(new wxButton(this, wxID_CANCEL, _T("&Cancel")),
0, wxCENTRE | wxALL, 5);
- SetSizer(sizerTop);
- sizerTop->Fit(this);
+ SetSizerAndFit(sizerTop);
}
void MyDialog::OnThrowInt(wxCommandEvent& WXUNUSED(event))
wxEXPAND );
#endif // wxUSE_LOG
- SetAutoLayout(true);
- SetSizer( topSizer );
-
- topSizer->Fit( this );
+ SetSizerAndFit( topSizer );
Centre();
SetDefaults();
sizerTop->Add(text, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
sizerTop->Add(sizerRow, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- SetSizer(sizerTop);
-
- sizerTop->SetSizeHints(this);
- sizerTop->Fit(this);
+ SetSizerAndFit(sizerTop);
btnOK->SetFocus();
btnOK->SetDefault();
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 );
}
//
wxFlexGridSizer* sizer = new wxFlexGridSizer(2, 1, 0, 0);
this->SetSizer(sizer);
- this->SetAutoLayout(true);
sizer->AddGrowableRow(0);
sizer->AddGrowableCol(0);
m_panel->SetSizer(m_sizerFrame);
- m_sizerFrame->Fit(this);
m_sizerFrame->SetSizeHints(this);
Centre(wxBOTH);
topSizer->Add( m_spinCtrl, 0, wxALL, 5 );
topSizer->Add( m_mouseText, 0, wxCENTRE|wxALL, 5 );
- m_panel->SetAutoLayout( true );
m_panel->SetSizer( topSizer );
topSizer->Fit(m_panel);
topSizer->Fit(this);
topSizer->Add( button2, 0, wxALL, 5 );
topSizer->Add( m_logWin, 1, wxEXPAND|wxALL, 5 );
- panel->SetAutoLayout( true );
panel->SetSizer( topSizer );
}
topSizer->AddSpacer(40);
topSizer->Add( okButton, 0, wxALL, 5 );
- panel->SetAutoLayout( true );
- panel->SetSizer( topSizer );
- topSizer->Fit(this);
+ panel->SetSizerAndFit( topSizer );
}
void MyDialog::OnStartSimplePopup(wxCommandEvent& event)
mainsizer->Add( middlesizer, 1, wxEXPAND );
- SetAutoLayout( true );
SetSizer( mainsizer );
}
topsizer->Add( m_log, 0, wxEXPAND );
#endif // wxUSE_LOG
- SetAutoLayout( true );
SetSizer( topsizer );
}
sizerTop->Add(-1, 10, 1, wxGROW);
sizerTop->Add(statbarBottom, 0, wxGROW);
- SetSizer(sizerTop);
-
- sizerTop->Fit(this);
- sizerTop->SetSizeHints(this);
+ SetSizerAndFit(sizerTop);
}
// ----------------------------------------------------------------------------
topSizer->Add( m_log, 1, wxALL | wxEXPAND, 10 );
#endif
- SetAutoLayout( true );
SetSizer(topSizer);
}
m_panel->SetSizer(sizerTop);
- sizerTop->Fit(this);
sizerTop->SetSizeHints(this);
#if USE_LOG && !defined(__WXCOCOA__)
wxALL,
5 // Border
);
- SetSizer(mainSizer);
- mainSizer->Fit(this);
+ SetSizerAndFit(mainSizer);
}
virtual bool TransferDataFromWindow()
5 // Border
);
- SetSizer(mainSizer);
- mainSizer->Fit(this);
+ SetSizerAndFit(mainSizer);
}
// wizard event handlers
wxTextCtrl* textCtrl = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, textSize, wxTE_MULTILINE);
mainSizer->Add(textCtrl, 0, wxALL|wxEXPAND, 5);
- SetSizer(mainSizer);
- mainSizer->Fit(this);
+ SetSizerAndFit(mainSizer);
}
// implement wxWizardPage functions