Python Forum
[Tkinter] Line Index
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Line Index
#1
How to get index of Line number where the cusror is present? I am using bind to call a function, i need to pass the function the index of the line
Reply
#2
If you are referring to a text widget, use:

cursorpos = text_widget_name.index(INSERT)
replace text_widget_name with real text widget name
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020