Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wxFileDialog::GetCurrentlySelectedFilterIndex() and wxEVT_UPDATE_UI event notification when the selected file type filter changes #1310

Closed
wants to merge 2 commits into from

Conversation

qtnc
Copy link
Contributor

@qtnc qtnc commented Apr 30, 2019

Add wxFileDialog::GetCurrentlySelectedFilterIndex() and wxEVT_UPDATE_UI event notification when the selected file type filter changes

Added method wxFileDialog::GetCurrentlySelectedFilterIndex().
This method returns the 0-based file type filter currently selected in a file dialog, analogously to GetCurrentlySelectedFilename() does for the current file.
Only supported in MSW. The value returned is always undefined elsewhere.

Added a wxEVT_UPDATE_UI event notification when the selection of the file type filter changes.
This allows extra file dialog controls to adjust their state depending on the file type filter currently selected.
Only supported in MSW.

…UI event notification when the selected file type filter changes

Added method wxFileDialog::GetCurrentlySelectedFilterIndex().
This method returns the 0-based file type filter currently selected in a file dialog, analogously to GetCurrentlySelectedFilename() does for the current file.
Only supported in MSW. The value returned is always undefined elsewhere.

Added a wxEVT_UPDATE_UI event notification when the selection of the file type filter changes.
This allows extra file dialog controls to adjust their state depending on the file type filter currently selected.
Only supported in MSW.
@vadz vadz closed this in 413abb0 May 2, 2019
vadz added a commit that referenced this pull request May 2, 2019
Update the dialogs sample to show GetCurrentlySelectedFilterIndex() in
action.

See #1310
@@ -350,6 +355,14 @@ void wxFileDialog::MSWOnSelChange(WXHWND hDlg)
m_extraControl->UpdateWindowUI(wxUPDATE_UI_RECURSE);
}

void wxFileDialog::MSWOnTypeChange(WXHWND hDlg, int nFilterIndex)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vadz hDlg causes a warning because it is not used. Could you add WXUNUSED?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants