Demonstrate disabling radio buttons in the sample
Radio buttons are different from the other controls internally in IFileDialogCustomize-based implementation, so check that disabling them also works correctly.
This commit is contained in:
parent
153a024492
commit
76ff441bf2
1 changed files with 7 additions and 0 deletions
|
|
@ -1731,6 +1731,13 @@ public:
|
|||
// Enable the button if and only if the checkbox is checked.
|
||||
m_btn->Enable(m_cb->GetValue());
|
||||
|
||||
// Enable radio buttons only if a file is selected.
|
||||
bool hasFile = wxFileName::FileExists(
|
||||
m_dialog->GetCurrentlySelectedFilename()
|
||||
);
|
||||
m_radioA4->Enable(hasFile);
|
||||
m_radioLetter->Enable(hasFile);
|
||||
|
||||
// Also show the current dialog state.
|
||||
m_label->SetLabelText(GetFileDialogStateDescription(m_dialog));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue