Fix using wxStaticBoxSizer in samples
If a control is contained in a wxStaticBoxSizer or its child sizer, wxStaticBoxSizer::GetStaticBox() should be used as the control's parent. However, widgets and dialogs samples did not do that, which resulted in flooding the message log in widgets sample with warnings about this; in dialogs sample the warnings were shown in the debug output. Fix this by always using the static box as the control's parent when the control is contained (directly or indirectly) in a wxStaticBoxSizer. Closes #23967.
This commit is contained in:
parent
cc41fa5458
commit
a69fabecb1
32 changed files with 657 additions and 567 deletions
|
|
@ -159,9 +159,11 @@ void DatePickerWidgetsPage::CreateContent()
|
|||
1, wxRA_SPECIFY_COLS);
|
||||
sizerLeft->Add(m_radioKind, wxSizerFlags().Expand().Border());
|
||||
|
||||
wxSizer* const sizerStyle = new wxStaticBoxSizer(wxVERTICAL, this, "&Style");
|
||||
m_chkStyleCentury = CreateCheckBoxAndAddToSizer(sizerStyle, "Show ¢ury");
|
||||
m_chkStyleAllowNone = CreateCheckBoxAndAddToSizer(sizerStyle, "Allow &no value");
|
||||
wxStaticBoxSizer* const sizerStyle = new wxStaticBoxSizer(wxVERTICAL, this, "&Style");
|
||||
wxStaticBox* const sizerStyleBox = sizerStyle->GetStaticBox();
|
||||
|
||||
m_chkStyleCentury = CreateCheckBoxAndAddToSizer(sizerStyle, "Show ¢ury", wxID_ANY, sizerStyleBox);
|
||||
m_chkStyleAllowNone = CreateCheckBoxAndAddToSizer(sizerStyle, "Allow &no value", wxID_ANY, sizerStyleBox);
|
||||
|
||||
sizerLeft->Add(sizerStyle, wxSizerFlags().Expand().Border());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue