Phoenix Logo

phoenix_title wx.TextEntryDialog

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

It is implemented as a generic wxWidgets dialog.


class_hierarchy Class Hierarchy

Inheritance diagram for class TextEntryDialog:

sub_classes Known Subclasses

wx.PasswordEntryDialog


method_summary Methods Summary

__init__ Default constructor.
Create  
GetValue Returns the text that the user has entered if the user has pressed wx.OK, or the original value if the user has pressed Cancel.
SetMaxLength This function sets the maximum number of characters the user can enter into this dialog.
SetValue Sets the default text value.
ShowModal Shows the dialog, returning wx.ID_OK if the user pressed wx.OK, and wx.ID_CANCEL otherwise.

property_summary Properties Summary

Value See GetValue and SetValue

api Class API



class wx.TextEntryDialog(Dialog)

Possible constructors:

TextEntryDialog()

TextEntryDialog(parent, message, caption=GetTextFromUserPromptStr,
                value="", style=TextEntryDialogStyle, pos=DefaultPosition)

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


Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Default constructor.

Call Create to really create the dialog later.

New in version 2.9.5.



__init__ (self, parent, message, caption=GetTextFromUserPromptStr, value=””, style=TextEntryDialogStyle, pos=DefaultPosition)

Constructor.

Use ShowModal to show the dialog.

See Create method for parameter description.

Parameters:
  • parent (wx.Window) –
  • message (string) –
  • caption (string) –
  • value (string) –
  • style (long) –
  • pos (wx.Point) –





Create(self, parent, message, caption=GetTextFromUserPromptStr, value="", style=TextEntryDialogStyle, pos=DefaultPosition)
Parameters:
  • parent (wx.Window) – Parent window.
  • message (string) – Message to show on the dialog.
  • caption (string) – The caption of the dialog.
  • value (string) – The default value, which may be the empty string.
  • style (long) – A dialog style, specifying the buttons (wx``wx.OK``, wx.CANCEL) and an optional wx.CENTRE style. Additionally, wx.TextCtrl styles (such as TE_PASSWORD or TE_MULTILINE ) may be specified here.
  • pos (wx.Point) – Dialog position.
Return type:

bool

New in version 2.9.5.



GetValue(self)

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

Return type:string


SetMaxLength(self, len)

This function sets the maximum number of characters the user can enter into this dialog.

Parameters:len (long) –

New in version 2.9.5.



SetValue(self, value)

Sets the default text value.

Parameters:value (string) –


ShowModal(self)

Shows the dialog, returning wx.ID_OK if the user pressed wx.OK, and wx.ID_CANCEL otherwise.

Call GetValue to retrieve the values of the string entered by the user after showing the dialog.

Return type:int

Properties



Value

See GetValue and SetValue