Added wxFilePickerCtrl::SetInitialDirectory().
This method allows to configure the initial directory to be shown when browsing for files in an initially empty wxFileDirPickerCtrl. It is also available for wxDirPickerCtrl but is less useful there. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -87,9 +87,13 @@ public:
|
||||
wxFileDirPickerWidgetBase() { }
|
||||
virtual ~wxFileDirPickerWidgetBase() { }
|
||||
|
||||
// Path here is the name of the selected file or directory.
|
||||
wxString GetPath() const { return m_path; }
|
||||
virtual void SetPath(const wxString &str) { m_path=str; }
|
||||
|
||||
// Set the directory to open the file browse dialog at initially.
|
||||
virtual void SetInitialDirectory(const wxString& dir) = 0;
|
||||
|
||||
// returns the picker widget cast to wxControl
|
||||
virtual wxControl *AsControl() = 0;
|
||||
|
||||
@@ -165,6 +169,12 @@ public: // public API
|
||||
wxString GetPath() const;
|
||||
void SetPath(const wxString &str);
|
||||
|
||||
// Set the directory to open the file browse dialog at initially.
|
||||
void SetInitialDirectory(const wxString& dir)
|
||||
{
|
||||
m_pickerIface->SetInitialDirectory(dir);
|
||||
}
|
||||
|
||||
public: // internal functions
|
||||
|
||||
void UpdatePickerFromTextCtrl();
|
||||
|
Reference in New Issue
Block a user