Use border style consistently in the widgets sample

Use GetAttrs().m_defaultFlags everywhere when creating the widgets, it
was done for some but not all of them before, without any apparent
reason.

This should make setting various border styles work (for the widgets
supporting them).
This commit is contained in:
Vadim Zeitlin
2018-03-17 17:50:56 +01:00
parent 0acb119ccb
commit 7e8fb1e294
13 changed files with 83 additions and 78 deletions

View File

@@ -90,9 +90,6 @@ protected:
// restore the checkboxes state to the initial values
void Reset();
// get the initial style for the picker of the given kind
long GetPickerStyle();
// update filepicker radiobox
void UpdateFilePickerMode();
@@ -223,17 +220,7 @@ void FilePickerWidgetsPage::CreatePicker()
{
delete m_filePicker;
// pass an empty string as initial file
m_filePicker = new wxFilePickerCtrl(this, PickerPage_File,
wxEmptyString,
wxT("Hello!"), wxT("*"),
wxDefaultPosition, wxDefaultSize,
GetPickerStyle());
}
long FilePickerWidgetsPage::GetPickerStyle()
{
long style = 0;
long style = GetAttrs().m_defaultFlags;
if ( m_chkFileTextCtrl->GetValue() )
style |= wxFLP_USE_TEXTCTRL;
@@ -255,7 +242,12 @@ long FilePickerWidgetsPage::GetPickerStyle()
else
style |= wxFLP_SAVE;
return style;
// pass an empty string as initial file
m_filePicker = new wxFilePickerCtrl(this, PickerPage_File,
wxEmptyString,
wxT("Hello!"), wxT("*"),
wxDefaultPosition, wxDefaultSize,
style);
}
void FilePickerWidgetsPage::RecreatePicker()