diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index 6821828e90..e560e6d58d 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -742,7 +742,7 @@ static char *small1_xpm[] = { void MyFrame::OnTestTreeCtrl(wxCommandEvent& WXUNUSED(event) ) { - wxDialog dialog( this, -1, "Test wxDataViewTreeStore", wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER ); + wxDialog dialog( this, -1, "Test wxDataViewTreeStore" ); wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL ); @@ -761,10 +761,10 @@ void MyFrame::OnTestTreeCtrl(wxCommandEvent& WXUNUSED(event) ) treectrl->AssociateModel( store ); store->DecRef(); - + wxSizer *button_sizer = dialog.CreateButtonSizer( wxOK ); if (button_sizer) - main_sizer->Add( button_sizer, 0, wxGROW ); + main_sizer->Add( button_sizer, 0, wxGROW|wxALL, 10 ); dialog.SetSizer( main_sizer ); main_sizer->Fit( &dialog ); diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 702339b6c6..8a13bf7d47 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3696,6 +3696,8 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, style | wxScrolledWindowStyle|wxSUNKEN_BORDER, validator)) return false; + SetInitialSize(size); + Init(); #ifdef __WXMAC__