wxWidgets: interface/wx/textdlg.h File Reference

| Version: 3.1.5

Classes | Macros | Functions | Variables
textdlg.h File Reference

## Classes
class | wxPasswordEntryDialog
| This class represents a dialog that requests a one-line password string from the user. More...
class | wxTextEntryDialog
| This class represents a dialog that requests a one-line text string from the user. More...

## Macros
#define | wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE)
| Default text dialog style. More...

## Functions
wxString | wxGetTextFromUser (const wxString &message, const wxString &caption=wxGetTextFromUserPromptStr, const wxString &default_value=wxEmptyString, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord, bool centre=true)
| Pop up a dialog box with title set to caption, `message`, and a `default_value`. More...
wxString | wxGetPasswordFromUser (const wxString &message, const wxString &caption=wxGetPasswordFromUserPromptStr, const wxString &default_value=wxEmptyString, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord, bool centre=true)
| Similar to wxGetTextFromUser() but the text entered in the dialog is not shown on screen but replaced with stars. More...

## Variables
const char | wxGetTextFromUserPromptStr [] = "Input Text"
| Default text dialog caption. More...
const char | wxGetPasswordFromUserPromptStr [] = "Enter Password"
| Default password dialog caption. More...

## Macro Definition Documentation

## ◆ wxTextEntryDialogStyle

#define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE)

Default text dialog style.

## Function Documentation

## ◆ wxGetPasswordFromUser()

wxString wxGetPasswordFromUser | ( | const wxString & | message,
|  | const wxString & | caption = `wxGetPasswordFromUserPromptStr`,
|  | const wxString & | default_value = `wxEmptyString`,
|  | wxWindow * | parent = `NULL`,
|  | int | x = `wxDefaultCoord`,
|  | int | y = `wxDefaultCoord`,
|  | bool | centre = `true`
| ) |  |

Similar to wxGetTextFromUser() but the text entered in the dialog is not shown on screen but replaced with stars.

This is intended to be used for entering passwords as the function name implies.

Include file:

    #include <wx/textdlg.h>

## ◆ wxGetTextFromUser()

wxString wxGetTextFromUser | ( | const wxString & | message,
|  | const wxString & | caption = `wxGetTextFromUserPromptStr`,
|  | const wxString & | default_value = `wxEmptyString`,
|  | wxWindow * | parent = `NULL`,
|  | int | x = `wxDefaultCoord`,
|  | int | y = `wxDefaultCoord`,
|  | bool | centre = `true`
| ) |  |

Pop up a dialog box with title set to caption, `message`, and a `default_value`.

The user may type in text and press OK to return this text, or press Cancel to return the empty string.

If `centre` is true, the message text (which may include new line characters) is centred; if false, the message is left-justified.

This function is a wrapper around wxTextEntryDialog and while it is usually more convenient to use, using the dialog directly is more flexible, e.g. it allows you to specify the `wxTE_MULTILINE` to allow the user enter multiple lines of text while this function is limited to single line entry only.

Include file:

    #include <wx/textdlg.h>

## Variable Documentation

## ◆ wxGetPasswordFromUserPromptStr

const char wxGetPasswordFromUserPromptStr[] = "Enter Password"

Default password dialog caption.

## ◆ wxGetTextFromUserPromptStr

const char wxGetTextFromUserPromptStr[] = "Input Text"

Default text dialog caption.