diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 865f6c3846..5bae8cc4af 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -650,6 +650,11 @@ wxPG_PROP_BEING_DELETED = 0x00200000 */ #define wxPG_FILE_DIALOG_TITLE wxS("DialogTitle") +/** Specific to wxFileProperty and derivatives, long, default is 0. + Sets a specific wxFileDialog style for the file dialog. +*/ +#define wxPG_FILE_DIALOG_STYLE wxS("DialogStyle") + /** Specific to wxDirProperty, wxString, default is empty. Sets a specific message for the dir dialog. */ diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h index 3c329f3134..7ce40e5f90 100644 --- a/interface/wx/propgrid/property.h +++ b/interface/wx/propgrid/property.h @@ -125,6 +125,13 @@ */ #define wxPG_FILE_DIALOG_TITLE wxS("DialogTitle") +/** Specific to wxFileProperty and derivatives, long, default is 0. + Sets a specific wxFileDialog style for the file dialog, e.g. ::wxFD_SAVE. + + @since 2.9.4 +*/ +#define wxPG_FILE_DIALOG_STYLE wxS("DialogStyle") + /** Specific to wxDirProperty, wxString, default is empty. Sets a specific message for the dir dialog. */ diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index bde3b65460..8bb315c708 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -1704,7 +1704,7 @@ bool wxPGFileDialogAdapter::DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty property->GetAttribute(wxS("InitialPath"), path), wxEmptyString, property->GetAttribute(wxPG_FILE_WILDCARD, wxALL_FILES), - 0, + property->GetAttributeAsLong(wxPG_FILE_DIALOG_STYLE, 0), wxDefaultPosition ); if ( indFilter >= 0 )