From b89cac3f09e84f94bea292a8534feda3830ecfb1 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 18 Oct 2007 15:07:11 +0000 Subject: [PATCH] Corrected wrong initial/min size of generic wxDataViewCtrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/dataview/dataview.cpp | 6 +++--- src/generic/datavgen.cpp | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) 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__