meh123
meh123

Reputation: 327

Setting the position of the insert character in the tkinter text widget

I'd like to change the position of the insert character in a tkinter text widget. Is there a method or any other way which will help me set the position where the insert character is at in the text widget?

Upvotes: 0

Views: 2504

Answers (1)

falsetru
falsetru

Reputation: 369044

You can use mark_set method with insert mark.

For example:

t.mark_set('insert', '2.3')

or

t.mark_set(INSERT, '2.3')

Above code will position a cursor after the 3rd character in 2nd line.

Upvotes: 3

Related Questions