Public Member Functions

# wxTextEntryDialog Class Reference
[Common Dialogs]

`#include <wx/textdlg.h>`

Inheritance diagram for wxTextEntryDialog:
[legend]

## Detailed Description

This class represents a dialog that requests a one-line text string from the user.

It is implemented as a generic wxWidgets dialog.

##

Library: wxCore
Category: Common Dialogs

See also:
  wxTextEntryDialog Overview

## Public Member Functions
| wxTextEntryDialog (wxWindow *parent, const wxString &message, const wxString &caption=wxGetTextFromUserPromptStr, const wxString &value=wxEmptyString, long style=wxOK|wxCANCEL|wxCENTRE, const wxPoint &pos=wxDefaultPosition)
| Constructor.
virtual | ~wxTextEntryDialog ()
| Destructor.
wxString | GetValue () const
| Returns the text that the user has entered if the user has pressed OK, or the original value if the user has pressed Cancel.
void | SetValue (const wxString &value)
| Sets the default text value.
int | ShowModal ()
| Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL otherwise.

List of all members.

## Constructor & Destructor Documentation

wxTextEntryDialog::wxTextEntryDialog | ( | wxWindow * | parent,
|  | const wxString & | message,
|  | const wxString & | caption = `wxGetTextFromUserPromptStr`,
|  | const wxString & | value = `wxEmptyString`,
|  | long | style = `wxOK|wxCANCEL|wxCENTRE`,
|  | const wxPoint & | pos = `wxDefaultPosition` |
| ) |  |  |

Constructor.

Use ShowModal() to show the dialog.

Parameters:

  | parent | Parent window.
  | message | Message to show on the dialog.
  | caption | The caption of the dialog.
  | value | The default value, which may be the empty string.
  | style | A dialog style, specifying the buttons (wxOK, wxCANCEL) and an optional wxCENTRE style. Additionally, wxTextCtrl styles (such as `wxTE_PASSWORD` or `wxTE_MULTILINE`) may be specified here.
  | pos | Dialog position.

virtual wxTextEntryDialog::~wxTextEntryDialog | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

wxString wxTextEntryDialog::GetValue | ( |  | ) | const

Returns the text that the user has entered if the user has pressed OK, or the original value if the user has pressed Cancel.

void wxTextEntryDialog::SetValue | ( | const wxString & | value | ) |

Sets the default text value.

int wxTextEntryDialog::ShowModal | ( |  | ) | `[virtual]`

Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL otherwise.

Reimplemented from wxDialog.

|  | [ top ]