Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Tkinter.Text widget - how to get text cursor position?

Reply
Thread Tools

Tkinter.Text widget - how to get text cursor position?

 
 
Alex9968
Guest
Posts: n/a
 
      03-19-2008
Is it possible to get position (in numbers) of the insertion cursor? As
I understood, Text widget uses mark named INSERT to store it, which is
available globally by just referencing INSERT, but how could I get
actual coordinate numbers of the mark?
I need this because I want not just to insert string at, but to examine
text before and after the insertion cursor. I can probably use .get() to
extract the halves of text before and after cursor, but it'd be better
just to know the position.

Thanks
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Tkinter.event.widget: handler gets name instead of widget. Frederic Rentsch Python 0 07-08-2012 09:19 PM
how to tell if cursor is sqlite.Cursor or psycopg2.Cursor dmaziuk Python 3 01-25-2011 04:52 AM
Re: Tkinter.Text widget - how to get text cursor position? Alex9968 Python 0 03-19-2008 07:07 PM
user interface widget: ordered selection list: do any UI library has this widget? zhangweiwu@realss.com Javascript 0 10-10-2006 01:02 AM



Advertisments