Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation
Components
gb
gb.args
gb.cairo
gb.chart
gb.clipper
gb.complex
gb.compress
gb.crypt
gb.data
gb.db
gb.db.form
gb.db.mysql
gb.db.odbc
gb.db.postgresql
gb.db.sqlite2
gb.db.sqlite3
gb.dbus
gb.dbus.trayicon
gb.debug
gb.desktop
gb.desktop.gnome.keyring
gb.desktop.x11
gb.eval
gb.eval.highlight
gb.form
gb.form.dialog
gb.form.editor
gb.form.htmlview
gb.form.mdi
gb.form.print
gb.form.stock
gb.form.terminal
gb.gmp
gb.gsl
gb.gtk
gb.gtk.opengl
gb.gtk3
gb.gtk3.opengl
gb.gtk3.webview
gb.gui
gb.gui.opengl
gb.gui.qt
gb.gui.qt.webkit
gb.gui.trayicon
gb.gui.webview
gb.hash
gb.image
gb.image.effect
gb.image.imlib
gb.image.io
gb.inotify
gb.jit
gb.libxml
gb.logging
gb.map
gb.markdown
gb.media
gb.media.form
gb.memcached
gb.mime
gb.mysql
gb.ncurses
gb.net
gb.net.curl
gb.net.pop3
gb.net.smtp
gb.openal
gb.opengl
gb.opengl.glsl
gb.opengl.glu
gb.opengl.sge
gb.openssl
gb.option
gb.pcre
gb.pdf
gb.poppler
gb.qt4
gb.qt4.ext
.editor.flags
.editor.line
.editor.lines
.editor.selection
.editor.style
.editor.styles
.TextEdit.Format
.TextEdit.Selection
Dial
editor
highlight
LCDNumber
TextEdit
_new
Border
Change
Clear
Copy
Cursor
Cut
EnsureVisible
Format
Index
Insert
Paragraph
Paste
Pos
ReadOnly
Redo
RichText
ScrollBar
ScrollX
ScrollY
Select
SelectAll
Selected
Selection
Text
TextHeight
TextWidth
ToIndex
ToParagraph
ToPos
Undo
Unselect
Wrap
gb.qt4.opengl
gb.qt4.webkit
gb.qt4.webview
gb.qt5
gb.qt5.ext
gb.qt5.opengl
gb.qt5.webkit
gb.qt5.webview
gb.report
gb.report2
gb.scanner
gb.sdl
gb.sdl.sound
gb.sdl2
gb.sdl2.audio
gb.settings
gb.signal
gb.term
gb.test
gb.util
gb.util.web
gb.v4l
gb.vb
gb.web
gb.web.feed
gb.web.form
gb.web.gui
gb.xml
gb.xml.html
gb.xml.rpc
gb.xml.xslt
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

TextEdit (gb.qt4.ext)

This control implements a rich-text editor.

This class inherits Control in gb.gtk.
This class is
Create a new TextEdit control.
creatable
.
Properties Methods Events
Action  
Returns or sets the background color used by the control.
Background  
Return or set if the control has a border.
Border  
Use this property for assigning a custom cursor to a control.
Cursor  
Indicates that the control is in design mode.
Design  
Direction  
Returns or sets if a control accepts drops.
Drop  
Indicates that the control is enabled.
Enabled  
Returns or sets if a control will expand if included in a container that arranges its contents.
Expand  
Returns or sets the font used to draw text in the control.
Font  
Returns or sets the foreground color used by the control.
Foreground  
Return a virtual object used for formatting the current selected text (or the current paragraph if no text is selected).
Format  
H   Handle   HasFocus   Height   Hovered   Id   Ignore  
Return or set the position of the current character inside the current paragraph.
Index  
Left  
Returns or sets the appearence of the cursor when it points inside the control.
Mouse  
Name   Next   NoTabFocus  
Return or set the index of the current paragraph, the first one being zero.
Paragraph  
Parent   PopupMenu  
Returns or sets the cursor position, in characters from the beginning of the text.
Pos  
Previous   Proxy  
Return or set if the user can modify the text.
ReadOnly  
Return or set the rich text contents of the control.
RichText  
RightToLeft   ScreenX   ScreenY  
Return or set which scrollbars are displayed.
ScrollBar  
Return or set the left position of the TextEdit scrolling area.
ScrollX  
Return or set the top position of the TextEdit scrolling area.
ScrollY  
Return if some text is selected.
Selected  
Return an object used for managing the selected text.
Selection  
Tag  
Return or set the plain text contents of the control.
Text  
Return the height of the rich text displayed in the control.
TextHeight  
Return the width of the rich text displayed in the control.
TextWidth  
Tooltip   Top   Tracking   Visible   W   Width   Window  
Return or set if the text is wrapped at the control width.
Wrap  
X   Y  
Clear the text.
Clear  
Copy the selected text into the clipboard.
Copy  
Cut the selected text into the clipboard.
Cut  
Delete   Drag  
Ensure that the cursor is visible on the screen, by scrolling the text area contents if necessary.
EnsureVisible  
Grab   Hide  
Insert the specified text at the cursor position.
Insert  
InsertRichText   Lower   Move   MoveScaled  
Paste the clipboard contents at the cursor position.
Paste  
Raise  
Redo the last undone action.
Redo  
Refresh   Reparent   Resize   ResizeScaled  
Define the selected text.
Select  
SelectAll   SetFocus   Show  
Convert a position into a character index inside a paragraph number.
ToIndex  
Convert a position into a paragraph number.
ToParagraph  
Convert a paragraph number and a character index inside its paragraph into a position.
ToPos  
Undo the last action.
Undo  
Unselect the current selected text.
Unselect  
Raised when the text of the control changes.
Change  
Raised when the cursor position changes.
Cursor  
DblClick   Drag   DragLeave   DragMove   Drop   Enter   GotFocus   KeyPress   KeyRelease   Leave   LostFocus   Menu   MouseDown   MouseDrag   MouseMove   MouseUp   MouseWheel  

Note:
The TextEdit.Foreground property has no effect on this control.
You must either use HTML syntax to set text colors inline or pre-set TextEdit.Format.Color

Eg.

  TextEdit1.RichText = "<font color=red>This is some red text</font> and this text is default text color"

Or this..


  TextEdit1.Format.Color = Color.Red
  TextEdit1.Insert("This is some red text")
  TextEdit1.Format.Color = Color.Default
  TextEdit1.Insert(" and this text is default text color")