@morten:
I see you change in rev7950
===================================================================
--- trunk/src/src/debuggersettingsdlg.cpp (revision 7949)
+++ trunk/src/src/debuggersettingsdlg.cpp (revision 7950)
@@ -60,15 +60,16 @@
m_treebook->SetMinSize(wxSize(600,440));
mainSizer->Add(m_treebook, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
staticLine = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(10,-1), wxLI_HORIZONTAL, _T("wxID_ANY"));
- mainSizer->Add(staticLine, 0, wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_BOTTOM, 5);
+ mainSizer->Add(staticLine, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
stdDialogButtons = new wxStdDialogButtonSizer();
stdDialogButtons->AddButton(new wxButton(this, wxID_OK, wxEmptyString));
stdDialogButtons->AddButton(new wxButton(this, wxID_CANCEL, wxEmptyString));
stdDialogButtons->Realize();
- mainSizer->Add(stdDialogButtons, 0, wxALL|wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 5);
+ mainSizer->Add(stdDialogButtons, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
SetSizer(mainSizer);
mainSizer->Fit(this);
mainSizer->SetSizeHints(this);
+ Center();
Connect(ID_TREEBOOK,wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED,(wxObjectEventFunction)&DebuggerSettingsDlg::OnPageChanged);
//*)
But this does not solve the problem, because there are many code snippets after Center() call in the constructor of DebuggerSettingsDlg::DebuggerSettingsDlg. And the size of the dialog is changed by those code snippets.
Please put the Center command in the end of the constructor like:
Index: E:/code/cb/cb_trunk/src/src/debuggersettingsdlg.cpp
===================================================================
--- E:/code/cb/cb_trunk/src/src/debuggersettingsdlg.cpp (revision 7950)
+++ E:/code/cb/cb_trunk/src/src/debuggersettingsdlg.cpp (working copy)
@@ -100,6 +100,8 @@
for (size_t ii = 0; ii < m_treebook->GetPageCount(); ++ii)
m_treebook->ExpandNode(ii);
+
+ Center();
}
DebuggerSettingsDlg::~DebuggerSettingsDlg()
This works OK.
The another issue is: If you search the word "CentreOnParent", you will see many dialog's constructor will call this in the end. As we discussed before, We should be consistent. Either all Center() or all CentreOnParent().
What do you think? (As jens said here:
Re: Debugger branch: Placement of Windows)
I think Center() is preferred. Right?