Skip to content

TextAreaCursor

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
BlitzPlus

TextAreaCursor

TextAreaCursor:Int32 textarea:Int32, units:Int32=1
Parameter Mode Type Default Description
textarea In Int32 required Handle of a text area.
units In Int32 1 1 gives the character position, 2 gives the line. Defaults to 1.

Returns: The position, counting from 0.

Description

Gives where the text cursor is.

Examples

Graphics 320, 240, 32, 2
win  = CreateWindow("Cursor", 10, 10, 300, 150, Desktop(), 3)
area = CreateTextArea(10, 10, 270, 90, win)
ActivateGadget area
Repeat
	e = WaitEvent()
	If e = $401 Then SetGadgetText win, "Cursor " + TextAreaCursor(area) + " line " + TextAreaCursor(area, 2)
Until e = $803

Media

TextAreaCursor

Related Commands

AddTextAreaText, TextAreaChar, TextAreaLen, TextAreaLine, TextAreaLineLen, TextAreaSelLen, TextAreaText, TextFieldText

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally