The Qt documentation in C++ of this class (QTextEdit) can be read here: http://doc.trolltech.com/4.3/qtextedit.html
A control for the form object, provides a powerful single-page rich text editor. |
Please read the control class overview Control as well.
It is an advanced WYSIWYG viewer/editor supporting rich text formatting using HTML-style tags. It is optimized to handle large documents and to respond quickly to user input. It can display a large HTML subset, including tables and images.
The following link lists the HTML tags supported by Qt's rich text engine: http://doc.trolltech.com/4.3/richtext-html-subset.html
The property “Value” contains the text of this control. “OldValue” is there as well. Use method “Append(String)” to quickly append text to the current text.
Be aware that either syntax highlighting through keywords or richt text is supported. This is no “limitation” of KBasic, but of Qt. Which means you cannot display rich text and combine it with syntax highlighting of keywords. WORKAROUND: First load the text in the Richtextbox and then load the keywords and it works. |
Property Value As String
Returns the text as plain text without RTF formatting or with RTF formatting, if AcceptRichText = True.
Property OldValue As String (ReadOnly)
Property Text As String.
Same as Value. Provided for easy-use.
Property ReadOnly As Boolean
Property WordWrap As Boolean
Property Flat As Boolean (ReadWrite)
If it is true, appears as flat control. This is only useful to change the visual appearance.
Property Alignment As String (ReadWrite)
Property AcceptRichText As Boolean (ReadWrite)
Property Comment1Begin As String (ReadOnly)
Property Comment1End As String (ReadOnly)
Property Comment2Begin As String (must be one character only / ReadOnly)
Means a one line comment, starts with one character till end of line (EOL)
Property Keywords As String (CSV/ReadOnly)
Property Commands As String (CSV/ReadOnly)
Property CommentColor As String (ReadOnly)
Property KeywordColor As String (ReadOnly)
Property CommandColor As String (ReadOnly)
Property StringColorAs String (ReadOnly)
Not implemented yet.
Function Html() As String
Function IsModified() As Boolean
Function SetModified(Boolean)
Not implemented yet.
Sub SetFontColor(ColorObject As Color)
Sub SetFontColor(ColorId As String)
Sub SetFontPointSize(FontPointSize As Double)
Sub SetFontFamily(FontFamily As String)
Sub SetFontBold(IsFontBold As Boolean)
Sub SetFontItalic(IsFontItalic As Boolean)
Sub SetFontUnderline(IsFontUnderline As Boolean)
Function Line() As Integer
Function Column() As Integer
Function Selected() As String
Sub Undo()
Sub Redo()
Sub SetTabChangesFocus(IsTabChangesFocus As Boolean)
Sub SetTabStopWidth (TabStopWidth As Integer)
Sub RemoveAll()
Sub Copy()
Sub Paste()
Sub Cut()
Sub SelectAll()
Sub InsertHtml(Text As String)
Sub InsertPlainText(Text As String)
Sub Append(Text As String)
Sub SetHtml(String)
Sub SetPlainText(String)
Function PlainText() As String
Sub SetTextCursorPosition(Row As Integer, Column As Integer)
Implemented since KBasic V1.89(j).
Sub SetTextCursorPosition(Index As Integer)
Not implemented yet.
WrappedLine() WrappedColumn() WrappedSetTextCursorPosition(Line, Column)
Works on the appearance the user is shown (visible count of lines and columns)
Not implemented yet.
Sub OnEvent()
This event is called whenever the text has changed.
Sub OnCursorPositionChanged()
Sub OnAction(CopyAvailable As Boolean, PasteAvailable As Boolean, UndoAvailable As Boolean, RedoAvailable As Boolean)