Version: 2.9.3
Public Member Functions
wxDirPickerCtrl Class Reference

#include <wx/filepicker.h>

Inheritance diagram for wxDirPickerCtrl:

Detailed Description

This control allows the user to select a directory.

The generic implementation is a button which brings up a wxDirDialog when clicked. Native implementation may differ but this is usually a (small) widget which give access to the dir-chooser dialog. It is only available if wxUSE_DIRPICKERCTRL is set to 1 (the default).

Styles

This class supports the following styles:

Events emitted by this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxFileDirPickerEvent& event)

Event macros for events emitted by this class:

Library:  wxCore
Category:  Picker Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance
See also:
wxDirDialog, wxFileDirPickerEvent

Public Member Functions

 wxDirPickerCtrl (wxWindow *parent, wxWindowID id, const wxString &path=wxEmptyString, const wxString &message=wxDirSelectorPromptStr, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDIRP_DEFAULT_STYLE, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxDirPickerCtrlNameStr)
 Initializes the object and calls Create() with all the parameters.
bool Create (wxWindow *parent, wxWindowID id, const wxString &path=wxEmptyString, const wxString &message=wxDirSelectorPromptStr, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDIRP_DEFAULT_STYLE, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxDirPickerCtrlNameStr)
 Creates the widgets with the given parameters.
wxFileName GetDirName () const
 Returns the absolute path of the currently selected directory as a wxFileName object.
wxString GetPath () const
 Returns the absolute path of the currently selected directory.
void SetDirName (const wxFileName &dirname)
 Just like SetPath() but this function takes a wxFileName object.
void SetPath (const wxString &dirname)
 Sets the absolute path of (the default converter uses current locale's charset)the currently selected directory.

List of all members.


Constructor & Destructor Documentation

wxDirPickerCtrl::wxDirPickerCtrl ( wxWindow parent,
wxWindowID  id,
const wxString path = wxEmptyString,
const wxString message = wxDirSelectorPromptStr,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = wxDIRP_DEFAULT_STYLE,
const wxValidator validator = wxDefaultValidator,
const wxString name = wxDirPickerCtrlNameStr 
)

Initializes the object and calls Create() with all the parameters.


Member Function Documentation

bool wxDirPickerCtrl::Create ( wxWindow parent,
wxWindowID  id,
const wxString path = wxEmptyString,
const wxString message = wxDirSelectorPromptStr,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = wxDIRP_DEFAULT_STYLE,
const wxValidator validator = wxDefaultValidator,
const wxString name = wxDirPickerCtrlNameStr 
)

Creates the widgets with the given parameters.

Parameters:
parentParent window, must not be non-NULL.
idThe identifier for the control.
pathThe initial directory shown in the control. Must be a valid path to a directory or the empty string.
messageThe message shown to the user in the wxDirDialog shown by the control.
posInitial position.
sizeInitial size.
styleThe window style, see wxDIRP_* flags.
validatorValidator which can be used for additional date checks.
nameControl name.
Returns:
true if the control was successfully created or false if creation failed.
wxFileName wxDirPickerCtrl::GetDirName ( ) const

Returns the absolute path of the currently selected directory as a wxFileName object.

This function is equivalent to GetPath().

wxString wxDirPickerCtrl::GetPath ( ) const

Returns the absolute path of the currently selected directory.

void wxDirPickerCtrl::SetDirName ( const wxFileName dirname)

Just like SetPath() but this function takes a wxFileName object.

void wxDirPickerCtrl::SetPath ( const wxString dirname)

Sets the absolute path of (the default converter uses current locale's charset)the currently selected directory.

This must be a valid directory if wxDIRP_DIR_MUST_EXIST style was given.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines