Package: gtk

Function gtk:editable-position

Lambda List

gtk:editable-position (editable)

Syntax

(gtk:editable-position editable) => position
(setf (gtk:editable-position editable) position)

Arguments

editable -- a gtk:editable widget
position -- an integer with the position of the cursor, in chars

Details

The gtk:editable-position function retrieves the current position of the cursor relative to the start of the content of the editable widget. The (setf gtk:editable-position) function sets the cursor position in the editable widget to the given value.

The cursor is displayed before the character with the given (base 0) index in the contents of the editable widget. The value must be less than or equal to the number of characters in the editable widget. A value of -1 indicates that the position should be set after the last character of the editable. Note that position is in characters, not in bytes.
 

See also

2024-11-15