tkinter text position????????

Neal Norwitz neal at metaslash.com
Fri Oct 18 17:41:50 EDT 2002


On Fri, 18 Oct 2002 16:09:23 -0400, jubafre wrote:

> i have a tkinter aplication, and i have a text componnent, i want to get
> the position of the cursor in the text, how can i do this???
> 
> i´m trying like this:
> text coponnent is 'self.arqui'
> 
> pos=self.arqui.index()
> pos=self.arqui.get()
> 
> I don´t know how to use index?

	from Tkconstants import CURRENT
	pos = self.arqui.index(CURRENT)

pos will be a string like 'line.character'
where line and character are integers.

Neal



More information about the Python-list mailing list