wxWidgets: wxFileDialogCustomize Class Reference

| Version: 3.1.7

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxFileDialogCustomize Class Reference
Class List by Category » Common Dialogs

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.7-1.x86_64/src/wxWidgets-3.1.7/interface/wx/filedlgcustomize.h>`

## Detailed Description

Used with wxFileDialogCustomizeHook to add custom controls to wxFileDialog.

An object of this class is passed to wxFileDialogCustomizeHook::AddCustomControls() to allow it to actually add controls to the dialog.

The pointers returned by the functions of this class belong to wxWidgets and should not be deleted by the application, just as wxWindow-derived objects (even if these controls do not inherit from wxWindow). These pointers become invalid when wxFileDialog::ShowModal() returns, and the dialog containing them is destroyed, and the latest point at which they can be still used is when wxFileDialogCustomizeHook::TransferDataFromCustomControls() is called.

##

Library: wxCore
Category: Common Dialogs

See also
  wxFileDialog

Since
  3.1.7

## Public Member Functions
wxFileDialogButton * | AddButton (const wxString &label)
| Add a button with the specified label.
wxFileDialogCheckBox * | AddCheckBox (const wxString &label)
| Add a checkbox with the specified label.
wxFileDialogRadioButton * | AddRadioButton (const wxString &label)
| Add a radio button with the specified label.
wxFileDialogChoice * | AddChoice (size_t n, const wxString *strings)
| Add a read-only combobox with the specified contents.
wxFileDialogTextCtrl * | AddTextCtrl (const wxString &label=wxString())
| Add a text control with an optional label preceding it.
wxFileDialogStaticText * | AddStaticText (const wxString &label)
| Add a static text with the given contents.

## Member Function Documentation

## ◆ AddButton()

wxFileDialogButton * wxFileDialogCustomize::AddButton | ( | const wxString & | label | ) |

Add a button with the specified label.

## ◆ AddCheckBox()

wxFileDialogCheckBox * wxFileDialogCustomize::AddCheckBox | ( | const wxString & | label | ) |

Add a checkbox with the specified label.

## ◆ AddChoice()

wxFileDialogChoice * wxFileDialogCustomize::AddChoice | ( | size_t | n,
|  | const wxString * | strings )

Add a read-only combobox with the specified contents.

The combobox doesn't have any initial selection, i.e. wxFileDialogChoice::GetSelection() returns `wxNOT_FOUND`, if some item must be selected, use wxFileDialogChoice::SetSelection() explicitly to do it.

Parameters

  n | The number of strings, must be positive, as there is no way to add more strings later and creating an empty combobox is not very useful.
  strings | A non-NULL pointer to an array of n strings.

## ◆ AddRadioButton()

wxFileDialogRadioButton * wxFileDialogCustomize::AddRadioButton | ( | const wxString & | label | ) |

Add a radio button with the specified label.

The first radio button added will be initially checked. All the radio buttons added immediately after it will become part of the same radio group and will not be checked, but checking any one of them later will uncheck the first button and all the other ones.

If two consecutive but distinct radio groups are required, AddStaticText() with an empty label can be used to separate them.

## ◆ AddStaticText()

wxFileDialogStaticText * wxFileDialogCustomize::AddStaticText | ( | const wxString & | label | ) |

Add a static text with the given contents.

The contents of the static text can be updated later, i.e. it doesn't need to be actually static.

## ◆ AddTextCtrl()

wxFileDialogTextCtrl * wxFileDialogCustomize::AddTextCtrl | ( | const wxString & | label = wxString() | ) |

Add a text control with an optional label preceding it.

Unlike all the other functions for adding controls, the label parameter here doesn't specify the contents of the text control itself, but rather the label appearing before it. Unlike static controls added by AddStaticText(), this label is guaranteed to be immediately adjacent to it.

If label is empty, no label is created.