# wxFileCtrlEvent Class Reference
[Events]

`#include <wx/filectrl.h>`

Inheritance diagram for wxFileCtrlEvent:
[legend]

## Detailed Description

A file control event holds information about events associated with wxFileCtrl objects.

## Events using this class

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

void handlerFuncName(wxFileCtrlEvent& event)
Event macros:

- EVT_FILECTRL_FILEACTIVATED(id, func):
  The user activated a file(by double-clicking or pressing Enter)
- EVT_FILECTRL_SELECTIONCHANGED(id, func):
  The user changed the current selection(by selecting or deselecting a file)
- EVT_FILECTRL_FOLDERCHANGED(id, func):
  The current folder of the file control has been changed
- EVT_FILECTRL_FILTERCHANGED(id, func):
  The current file filter of the file control has been changed

##

Library: wxBase

Category: Events

## Public Member Functions
| wxFileCtrlEvent (wxEventType type, wxObject *evtObject, int id)
| Constructor.
wxString | GetDirectory () const
| Returns the current directory.
wxString | GetFile () const
| Returns the file selected (assuming it is only one file).
wxArrayString | GetFiles () const
| Returns the files selected.
int | GetFilterIndex () const
| Returns the current file filter index.
void | SetFiles (const wxArrayString &files)
| Sets the files changed by this event.
void | SetDirectory (const wxString &directory)
| Sets the directory of this event.
void | SetFilterIndex (int index)
| Sets the filter index changed by this event.

List of all members.

## Constructor & Destructor Documentation

wxFileCtrlEvent::wxFileCtrlEvent | ( | wxEventType | type,
|  | wxObject * | evtObject,
|  | int | id |
| ) |  |  |

Constructor.

## Member Function Documentation

wxString wxFileCtrlEvent::GetDirectory | ( |  | ) | const

Returns the current directory.

In case of a EVT_FILECTRL_FOLDERCHANGED, this method returns the new directory.

wxString wxFileCtrlEvent::GetFile | ( |  | ) | const

Returns the file selected (assuming it is only one file).

wxArrayString wxFileCtrlEvent::GetFiles | ( |  | ) | const

Returns the files selected.

In case of a EVT_FILECTRL_SELECTIONCHANGED, this method returns the files selected after the event.

int wxFileCtrlEvent::GetFilterIndex | ( |  | ) | const

Returns the current file filter index.

For a EVT_FILECTRL_FILTERCHANGED event, this method returns the new file filter index.

Since:
  2.9.1

void wxFileCtrlEvent::SetDirectory | ( | const wxString & | directory | ) |

Sets the directory of this event.

void wxFileCtrlEvent::SetFiles | ( | const wxArrayString & | files | ) |

Sets the files changed by this event.

void wxFileCtrlEvent::SetFilterIndex | ( | int | index | ) |

Sets the filter index changed by this event.

Since:
  2.9.1

|  | [ top ]