Contents Up Previous Next

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

Members

wxTextEntryDialog::wxTextEntryDialog
wxTextEntryDialog::~wxTextEntryDialog
wxTextEntryDialog::GetValue
wxTextEntryDialog::SetValue
wxTextEntryDialog::ShowModal


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

message

defaultValue

style

pos


wxTextEntryDialog::~wxTextEntryDialog

~wxTextEntryDialog()

Destructor.


wxTextEntryDialog::GetValue

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.


wxTextEntryDialog::SetValue

void SetValue(const wxString& value)

Sets the default text value.


wxTextEntryDialog::ShowModal

int ShowModal()

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