Package wx :: Class TextCtrl
[frames | no frames]

Type TextCtrl

object --+                
         |                
    Object --+            
             |            
    EvtHandler --+        
                 |        
            Window --+    
                     |    
               Control --+
                         |
                        TextCtrl

Known Subclasses:
BaseMaskedTextCtrl, Calltip, CTextCellEditor, DispatcherListing, IntCtrl, RightTextCtrl, SessionListing

Proxy of C++ TextCtrl class
Method Summary
Control __init__(self, parent, id, pos, size, style, validator, name)
Create a Control.
  __repr__(self)
  AppendText(self, text)
bool CanCopy(self)
bool CanCut(self)
bool CanPaste(self)
bool CanRedo(self)
bool CanUndo(self)
  Clear(self)
  Copy(self)
bool Create(self, parent, id, pos, size, style, validator, name)
Do the 2nd phase and create the GUI control.
  Cut(self)
  DiscardEdits(self)
bool EmulateKeyPress(self, event)
VisualAttributes GetClassDefaultAttributes(variant)
Get the default attributes for this class. (Static method)
TextAttr GetDefaultStyle(self)
long GetInsertionPoint(self)
long GetLastPosition(self)
int GetLineLength(self, lineNo)
String GetLineText(self, lineNo)
int GetNumberOfLines(self)
String GetRange(self, from, to)
(from, to) GetSelection()
If the return values from and to are the same, there is no selection.
String GetString(self, from, to)
String GetStringSelection(self)
bool GetStyle(self, position, style)
String GetValue(self)
(result, col, row) HitTest(pt)
Find the row, col coresponding to the character at the point given in pixels.
(result, position) HitTestPos(pt)
Find the character position in the text coresponding to the point given in pixels.
bool IsEditable(self)
bool IsModified(self)
bool IsMultiLine(self)
bool IsSingleLine(self)
bool LoadFile(self, file)
  MarkDirty(self)
  Paste(self)
(x, y) PositionToXY(pos)
  Redo(self)
  Remove(self, from, to)
  Replace(self, from, to, value)
bool SaveFile(self, file)
  SelectAll(self)
bool SetDefaultStyle(self, style)
  SetEditable(self, editable)
  SetInsertionPoint(self, pos)
  SetInsertionPointEnd(self)
  SetMaxLength(*args, **kwargs)
SetMaxLength(self, unsigned long len)
  SetSelection(self, from, to)
bool SetStyle(self, start, end, style)
  SetValue(self, value)
  ShowPosition(self, pos)
  Undo(self)
  write(self, text)
  WriteText(self, text)
long XYToPosition(self, x, y)

Instance Method Details

__init__(self, parent, id=-1, value=EmptyString, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=TextCtrlNameStr)
(Constructor)

Create a Control. Normally you should only call this from a subclass' __init__ as a plain old wx.Control is not very useful.
Parameters:
parent
           (type=Window)
id
           (type=int)
pos
           (type=Point)
size
           (type=Size)
style
           (type=long)
validator
           (type=Validator)
name
           (type=String)
Returns:
Control
Overrides:
wx.Control.__init__ (inherited documentation)

Create(self, parent, id=-1, value=EmptyString, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=TextCtrlNameStr)

Do the 2nd phase and create the GUI control.
Parameters:
parent
           (type=Window)
id
           (type=int)
pos
           (type=Point)
size
           (type=Size)
style
           (type=long)
validator
           (type=Validator)
name
           (type=String)
Returns:
bool
Overrides:
wx.Control.Create (inherited documentation)

GetSelection()

If the return values from and to are the same, there is no selection.
Returns:
(from, to)

HitTest(pt)

Find the row, col coresponding to the character at the point given in pixels. NB: pt is in device coords but is not adjusted for the client area origin nor scrolling.
Parameters:
pt
           (type=Point)
Returns:
(result, col, row)
Overrides:
wx.Window.HitTest

HitTestPos(pt)

Find the character position in the text coresponding to the point given in pixels. NB: pt is in device coords but is not adjusted for the client area origin nor scrolling.
Parameters:
pt
           (type=Point)
Returns:
(result, position)

SetMaxLength(*args, **kwargs)

SetMaxLength(self, unsigned long len)

Static Method Details

GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)

Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes.

The variant parameter is only relevant under Mac currently and is ignore under other platforms. Under Mac, it will change the size of the returned font. See wx.Window.SetWindowVariant for more about this.

Parameters:
variant
           (type=int)
Returns:
VisualAttributes

Generated by Epydoc 2.1.20040428.rpd on Tue Apr 26 14:25:05 2005 http://epydoc.sf.net