FXText

Multiline text widget


FXText(p, tgt=None, sel=0, opts=0, x=0, y=0, w=0, h=0)

Construct multi-line text widget.

ArgumentTypeDefaultDescription
pFXComposite  
tgtFXObjectNone 
selInt0 
optsInt0 
xInt0 
yInt0 
wInt0 
hInt0 


appendText(text, n, notify=False)

Append n characters of text at the end of the buffer.

ArgumentTypeDefaultDescription
textString  
nInt  
notifyBoolFalse 


canFocus()

Returns True because a text widget can receive focus.

Reimplemented from FXWindow.


create()

Create server-side resources.

Reimplemented from FXComposite.


detach()

Detach server-side resources.

Reimplemented from FXComposite.


disable()

Disable the text widget.

Reimplemented from FXWindow.


enable()

Enable the text widget.

Reimplemented from FXWindow.


extractText(text, pos, n)

Extract n characters of text from position pos.

ArgumentTypeDefaultDescription
textString  
posInt  
nInt  


getBarColor()

Return bar color.


getBarColumns()

Return number of columns used for line numbers.


getChar(pos)

Get character at position in text buffer.

ArgumentTypeDefaultDescription
posInt  


getContentHeight()

Get default height.

Reimplemented from FXScrollArea.


getContentWidth()

Get default width.

Reimplemented from FXScrollArea.


getCursorCol()

Return cursor row, i.e. indent position.


getCursorColor()

Return cursor color.


getCursorPos()

Return the cursor position.


getCursorRow()

Return cursor row.


getDefaultHeight()

Return default height.

Reimplemented from FXScrollArea.


getDefaultWidth()

Return default width.

Reimplemented from FXScrollArea.


getFont()

Return text font.


getLength()

Return length of buffer.


getMarginBottom()

Return bottom margin.


getMarginLeft()

Return left margin.


getMarginRight()

Return right margin.


getMarginTop()

Return top margin.


getNumberColor()

Return line number color.


getPosAt(x, y)

Return text position at given visible x,y coordinate.

ArgumentTypeDefaultDescription
xInt  
yInt  


getSelBackColor()

Return selected background color.


getSelEndPos()

Return selendpos.


getSelStartPos()

Return selstartpos.


getSelTextColor()

Return selected text color.


getText()

Return text in the widget.


getText(text, n)

Retrieve text into buffer.

ArgumentTypeDefaultDescription
textString  
nInt  


getTextColor()

Return text color.


getTopLine()

Return position of top line.


getVisCols()

Return number of visible columns.


getVisRows()

Return number of visible rows.


insertText(pos, text, n, notify=False)

Insert n characters of text at position pos into the buffer.

ArgumentTypeDefaultDescription
posInt  
textString  
nInt  
notifyBoolFalse 


isEditable()

Return True if text is editable.


isModified()

Return True if text was modified.


isPosSelected(pos)

Return True if position pos is selected.

ArgumentTypeDefaultDescription
posInt  


killSelection(notify=False)

Unselect the text.

ArgumentTypeDefaultDescription
notifyBoolFalse 


lineEnd(pos)

Return position of end of line containing position pos.

ArgumentTypeDefaultDescription
posInt  


lineStart(pos)

Return position of begin of line containing position pos.

ArgumentTypeDefaultDescription
posInt  


makePositionVisible(pos)

Scroll text to make the given position visible.

ArgumentTypeDefaultDescription
posInt  


moveContents(x, y)

Scroll the contents.

Reimplemented from FXScrollArea.

ArgumentTypeDefaultDescription
xInt  
yInt  


nextLine(pos, nl=1)

Return start of next line.

ArgumentTypeDefaultDescription
posInt  
nlInt1 


nextRow(pos, nr=1)

Return start of next row.

ArgumentTypeDefaultDescription
posInt  
nrInt1 


position(x, y, w, h)

Move and resize this window in the parent's coordinates.

Reimplemented from FXWindow.

ArgumentTypeDefaultDescription
xInt  
yInt  
wInt  
hInt  


prevLine(pos, nl=1)

Return start of previous line.

ArgumentTypeDefaultDescription
posInt  
nlInt1 


prevRow(pos, nr=1)

Return start of previous row.

ArgumentTypeDefaultDescription
posInt  
nrInt1 


recalc()

Need to recalculate size.

Reimplemented from FXWindow.


removeText(pos, n, notify=False)

Remove n characters of text at position pos from the buffer.

ArgumentTypeDefaultDescription
posInt  
nInt  
notifyBoolFalse 


replaceText(pos, m, text, n, notify=False)

Replace m characters at pos by n characters.

ArgumentTypeDefaultDescription
posInt  
mInt  
textString  
nInt  
notifyBoolFalse 


resize(w, h)

Resize this window to the specified width and height.

Reimplemented from FXWindow.

ArgumentTypeDefaultDescription
wInt  
hInt  


rowEnd(pos)

Return row end.

ArgumentTypeDefaultDescription
posInt  


rowStart(pos)

Return row start.

ArgumentTypeDefaultDescription
posInt  


setBarColor(clr)

Change bar color.

ArgumentTypeDefaultDescription
clrFXColor  


setBarColumns(cols)

Change number of columns used for line numbers.

ArgumentTypeDefaultDescription
colsInt  


setBottomLine(pos)

Make line containing pos the bottom line.

ArgumentTypeDefaultDescription
posInt  


setCursorCol(col, notify=False)

Set cursor column.

ArgumentTypeDefaultDescription
colInt  
notifyBoolFalse 


setCursorColor(clr)

Change cursor color.

ArgumentTypeDefaultDescription
clrFXColor  


setCursorPos(pos, notify=False)

Set the cursor position.

ArgumentTypeDefaultDescription
posInt  
notifyBoolFalse 


setCursorRow(row, notify=False)

Set cursor row.

ArgumentTypeDefaultDescription
rowInt  
notifyBoolFalse 


setEditable(edit=True)

Set editable flag.

ArgumentTypeDefaultDescription
editBoolTrue 


setFont(fnt)

Change text font.

ArgumentTypeDefaultDescription
fntFXFont  


setMarginBottom(pb)

Change bottom margin.

ArgumentTypeDefaultDescription
pbInt  


setMarginLeft(pl)

Change left margin.

ArgumentTypeDefaultDescription
plInt  


setMarginRight(pr)

Change right margin.

ArgumentTypeDefaultDescription
prInt  


setMarginTop(pt)

Change top margin.

ArgumentTypeDefaultDescription
ptInt  


setModified(mod=True)

Set modified flag.

ArgumentTypeDefaultDescription
modBoolTrue 


setNumberColor(clr)

Change line number color.

ArgumentTypeDefaultDescription
clrFXColor  


setSelBackColor(clr)

Change selected background color.

ArgumentTypeDefaultDescription
clrFXColor  


setSelection(pos, len, notify=False)

Select len characters starting at given position pos.

ArgumentTypeDefaultDescription
posInt  
lenInt  
notifyBoolFalse 


setSelTextColor(clr)

Change selected text color.

ArgumentTypeDefaultDescription
clrFXColor  


setText(text, notify=False)

Change the text.

ArgumentTypeDefaultDescription
textString  
notifyBoolFalse 


setText(text, n, notify=False)

Change the text in the buffer to new text.

ArgumentTypeDefaultDescription
textString  
nInt  
notifyBoolFalse 


setTextColor(clr)

Change text color.

ArgumentTypeDefaultDescription
clrFXColor  


setTopLine(pos)

Make line containing pos the top line.

ArgumentTypeDefaultDescription
posInt  


setVisCols(cols)

Change number of visible columns.

ArgumentTypeDefaultDescription
colsInt  


setVisRows(rows)

Change number of visible rows.

ArgumentTypeDefaultDescription
rowsInt  


Global flags

Text widget options

TEXT_READONLY

Text is NOT editable.

TEXT_WORDWRAP

Wrap at word breaks.

TEXT_OVERSTRIKE

Overstrike mode.

TEXT_FIXEDWRAP

Fixed wrap columns.

TEXT_NO_TABS

Insert spaces for tabs.

TEXT_AUTOINDENT

Autoindent.

TEXT_SHOWACTIVE

Show active line.

Selection modes

SELECT_CHARS

Select characters.

SELECT_WORDS

Select words.

SELECT_LINES

Select lines.