View Source wxDirPickerCtrl (wx v2.4.2)

Functions for wxDirPickerCtrl class

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:

See: wxDirDialog, wxFileDirPickerEvent

This class is derived (and can use functions) from: wxPickerBase wxControl wxWindow wxEvtHandler

wxWidgets docs: wxDirPickerCtrl

Events

Event types emitted from this class: command_dirpicker_changed

Summary

Functions

Creates the widgets with the given parameters.

Destroys the object.

Returns the absolute path of the currently selected directory.

Initializes the object and calls create/4 with all the parameters.

Sets the absolute path of the currently selected directory.

Types

-type wxDirPickerCtrl() :: wx:wx_object().

Functions

Link to this function

create(This, Parent, Id)

View Source
-spec create(This, Parent, Id) -> boolean()
                when This :: wxDirPickerCtrl(), Parent :: wxWindow:wxWindow(), Id :: integer().
-spec create(This, Parent, Id, [Option]) -> boolean()
                when
                    This :: wxDirPickerCtrl(),
                    Parent :: wxWindow:wxWindow(),
                    Id :: integer(),
                    Option ::
                        {path, unicode:chardata()} |
                        {message, unicode:chardata()} |
                        {pos, {X :: integer(), Y :: integer()}} |
                        {size, {W :: integer(), H :: integer()}} |
                        {style, integer()} |
                        {validator, wx:wx_object()}.

Creates the widgets with the given parameters.

Return: true if the control was successfully created or false if creation failed.

-spec destroy(This :: wxDirPickerCtrl()) -> ok.

Destroys the object.

-spec getPath(This) -> unicode:charlist() when This :: wxDirPickerCtrl().

Returns the absolute path of the currently selected directory.

-spec new() -> wxDirPickerCtrl().
-spec new(Parent, Id) -> wxDirPickerCtrl() when Parent :: wxWindow:wxWindow(), Id :: integer().
-spec new(Parent, Id, [Option]) -> wxDirPickerCtrl()
             when
                 Parent :: wxWindow:wxWindow(),
                 Id :: integer(),
                 Option ::
                     {path, unicode:chardata()} |
                     {message, unicode:chardata()} |
                     {pos, {X :: integer(), Y :: integer()}} |
                     {size, {W :: integer(), H :: integer()}} |
                     {style, integer()} |
                     {validator, wx:wx_object()}.

Initializes the object and calls create/4 with all the parameters.

-spec setPath(This, Dirname) -> ok when This :: wxDirPickerCtrl(), Dirname :: unicode:chardata().

Sets the absolute path of the currently selected directory.

If the control uses wxDIRP_DIR_MUST_EXIST and does not use wxDIRP_USE_TEXTCTRL style, the dirname must be a name of an existing directory and will be simply ignored by the native wxGTK implementation if this is not the case.