Previous: , Up: BLOX.BText   [Index]


1.42.8 BLOX.BText: position & lines

charsInLine: number

Answer how many characters are there in the number-th line

currentColumn

Answer the 1-based column number where the insertion point currently lies.

currentLine

Answer the 1-based line number where the insertion point currently lies.

currentPosition

Answer a Point representing where the insertion point currently lies. Both coordinates in the answer are 1-based: the first line is line 1, and the first character in the first line is character 1.

currentPosition: aPoint

Move the insertion point to the position given by aPoint. Both coordinates in aPoint are interpreted as 1-based: the first line is line 1, and the first character in the first line is character 1.

gotoLine: line end: aBoolean

If aBoolean is true, move the insertion point to the last character of the line-th line (1 being the first line in the widget); if aBoolean is false, move it to the start of the line-th line.

indexAt: point

Answer the position of the character that covers the pixel whose coordinates within the text’s window are given by the supplied Point object.

lineAt: number

Answer the number-th line of text in the widget

numberOfLines

Answer the number of lines in the widget

selectFrom: first to: last

Select the text between the given endpoints. The two endpoints are Point objects in which both coordinates are 1-based: the first line is line 1, and the first character in the first line is character 1.

setToEnd

Move the insertion point to the end of the widget


Previous: , Up: BLOX.BText   [Index]