wxTextEntryDialog

This class represents a dialog that requests a one-line text string from the user. It is implemented as a generic wxWidgets dialog.

Derived from

wxDialog
wxWindow
wxEvtHandler
wxObject

Include files

<wx/textdlg.h>

See also

wxTextEntryDialog overview



wxTextEntryDialog::wxTextEntryDialog



wxTextEntryDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Please enter text", const wxString& defaultValue = "", long style = wxOK || wxCANCEL || wxCENTRE, const wxPoint& pos = wxDefaultPosition)

Constructor. Use wxTextEntryDialog::ShowModal to show the dialog.

Parameters

parent
Parent window.

message
Message to show on the dialog.

defaultValue
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) may be specified here.

pos
Dialog position.



wxTextEntryDialog::~wxTextEntryDialog



~wxTextEntryDialog(void)

Destructor.



wxTextEntryDialog::GetValue

wxString GetValue(void) 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.



wxTextEntryDialog::SetValue



void SetValue(const wxString& value)

Sets the default text value.



wxTextEntryDialog::ShowModal



int ShowModal(void)

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

ymasuda 平成17年11月19日