Component: TextField


Required Attributes

NameDefault value
nameNone

Optional Attributes

NameDefault value
alignment['left', 'right', 'center']
backgroundColorNone
border['3d', 'none']
commandNone
editable1
enabled1
fontNone
foregroundColorNone
id-1
position[-1, -1]
size[-1, -1]
text''
toolTip''
userdata''
visible1

Events:

closeField
gainFocus
keyDown
keyPress
keyUp
loseFocus
mouseContextDoubleClick
mouseContextDown
mouseContextUp
mouseDoubleClick
mouseDown
mouseEnter
mouseLeave
mouseMiddleDoubleClick
mouseMiddleDown
mouseMiddleUp
mouseMove
mouseUp
textUpdate
timer

Methods:

methodargsdoc stringcomments
appendText(self, aString)Appends the text to the end of the text widget. After the text is appended, the insertion point will be at the end of the text widget. If this behavior is not desired, the programmer should use getInsertionPoint and setInsertionPoint.# KEA new methods to mirror wxPython wxTextCtrl capabilities
canCopy(self)  
canCut(self)  
canPaste(self)  
canRedo(self)  
canUndo(self)  
clear(self)  
copy(self)  
cut(self)  
discardEdits(self)  
getId(self) # KEA 2004-04-10 # getId should go away # components should just use # self.id during and after initialization
getInsertionPoint(self)  
getLastPosition(self)  
getLineLength(self, aLineNumber)  
getLineText(self, aLineNumber)  
getNumberOfLines(self)  
getSelection(self)  
getString(self, aFrom, aTo)  
getStringSelection(self) # KEA added 2001-11-13 # this will be replaced once 2.3.2 has GetStringSelection
isModified(self)Returns 1 if the text has been modified, 0 otherwise.# KEA rename to getModified?
paste(self)  
positionToXY(self, aPosition)  
redo(self)  
remove(self, aFrom, aTo)  
replace(self, aFrom, aTo, aString)  
replaceSelection(self, aString, select=0) if wxPlatform == "__WXMSW__": if select: sel = self._delegate.GetSelection() numNewlines = aString.count(' ') self._delegate.WriteText(aString) self._delegate.SetSelection( sel[0], sel[0] + len(aString) + numNewlines) else: self._delegate.WriteText(aString) else: # Linux  
setFocus(self, aBoolean=1)  
setInsertionPoint(self, aPosition)  
setInsertionPointEnd(self)  
setSelection(self, aFrom, aTo)  
showPosition(self, aPosition)  
undo(self)  
write(*args, **kwargs)write(String text) 
writeText(self, aString)  
xyToPosition(self, aX, aY)  

SourceForge Logo