wxfilepickerctrlthis control allows the user to select a file. the generic implementation is a button which brings up a wxfiledialog when clicked. native implementation may differ but this is usually a (small) widget which give access to the file-chooser dialog. it is only available if wxuse_filepickerctrl is set to 1 (the default). derived from
wxpickerbase include files <wx/filepicker.h> window styles
event handling to process a file picker event, use these event handler macros to direct input to member functions that take a wxfiledirpickerevent argument.
see also
wxfiledialog, members
wxfilepickerctrl::wxfilepickerctrl
wxfilepickerctrl::wxfilepickerctrlwxfilepickerctrl(wxwindow *parent, wxwindowid id, const wxstring& path = wxemptystring, const wxstring& message = "select a file", const wxstring& wildcard = "*.*", const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxflp_default_style, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "filepickerctrl") initializes the object and calls create with all the parameters.
wxfilepickerctrl::createbool create(wxwindow *parent, wxwindowid id, const wxstring& path = wxemptystring, const wxstring& message = "select a file", const wxstring& wildcard = "*.*", const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxflp_default_style, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "filepickerctrl") parameters parent
id
path
message
wildcard
pos
size
style
validator
name
return value true if the control was successfully created or false if creation failed.
wxfilepickerctrl::getpathwxstring getpath() const returns the absolute path of the currently selected file.
wxfilepickerctrl::setpathvoid setpath(const wxstring &filename) sets the absolute path of the currently selected file. this must be a valid file if the wxflp_file_must_exist style was given.
|