Bug #14492 2008-09-12 17:13
starofrainnight
wxSplitterWindow's Sash position setting no effect!
operating system : WinXP SP2
wxWidget : version 2.8.8 UNICODE built as a monolithic library
CodeBlocks : svn 5195
=============================
when i set the wxSplitterWindows's "Sash position" to 100, CodeBlocks havn't generate a correct code.
it generate like this:
SplitterWindow1->SplitVertically(TextCtrl1, TextCtrl2);
but, it should be generate lik this:
SplitterWindow1->SplitVertically(TextCtrl1, TextCtrl2, 100);
=============================
these steps to reproduct it :
1. create a net simple dialog program
2. put a BoxSizer in the dialog
3. put a wxSplitterWindow in the BoxSizer
set wxSplitterWindow's "Expand" = true
set wxSplitterWindow's "Orientation" = vertital
set wxSplitterWindow's "Sash position" = 100
4. put 2 wxTextCtrl into the wxSplitterWindow
then save all files. the wxSmitch generate the code like this:
TestDialog::TestDialog(wxWindow* parent,wxWindowID id)
{
//(*Initialize(TestDialog)
wxBoxSizer* BoxSizer1;
Create(parent, id, _("wxWidgets app"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
SplitterWindow1 = new wxSplitterWindow(this, ID_SPLITTERWINDOW1, wxDefaultPosition, wxSize(61,79), wxSP_3D, _T("ID_SPLITTERWINDOW1"));
SplitterWindow1->SetMinimumPaneSize(10);
TextCtrl1 = new wxTextCtrl(SplitterWindow1, ID_TEXTCTRL1, _("Text"), wxPoint(17,2), wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
TextCtrl2 = new wxTextCtrl(SplitterWindow1, ID_TEXTCTRL2, _("Text"), wxPoint(87,19), wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
//************************************
// see this???? the third parameter has not set !!
// it should be generate a number 100 to the third
// parameter. it should generate like this :
// SplitVertically(TextCtrl1,TextCtrl2,100);
SplitterWindow1->SplitVertically(TextCtrl1, TextCtrl2);
//
//************************************
BoxSizer1->Add(SplitterWindow1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
SetSizer(BoxSizer1);
BoxSizer1->Fit(this);
BoxSizer1->SetSizeHints(this);
//*)
}
- Category
- Plugin::wxSmith
- Group
- Status
- Closed
- Close date
- 2008-11-05 18:00
- Assigned to
- jenslody
History
jenslody 2008-11-05 18:00
The bug is fixed in svn.