Line number in Tkinter Text field

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jul 2009
Posts: 241
Reputation: masterofpuppets is an unknown quantity at this point 
Solved Threads: 58
masterofpuppets's Avatar
masterofpuppets masterofpuppets is offline Offline
Posting Whiz in Training

Line number in Tkinter Text field

 
0
  #1
Oct 30th, 2009
hi all,
I am designing a text editor program in Python using Tkinter and I was wondering if there's any way to get the current line number when the mouse is clicked somewhere on the text field, i.e the mouse position should determine the current line, like in the python editor window... for the text field I am using a ScrolledText widget.
Any help or hint is appreciated thx in advance
My site ->> http://8masterofpuppets8.webs.com/
"My belief is stronger than your doubt."
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,075
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 939
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite
 
1
  #2
Oct 31st, 2009
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 241
Reputation: masterofpuppets is an unknown quantity at this point 
Solved Threads: 58
masterofpuppets's Avatar
masterofpuppets masterofpuppets is offline Offline
Posting Whiz in Training
 
0
  #3
Oct 31st, 2009
thanks a lot that's exactly what I was looking for, I'll just modify the bind function to .bind( "<Button-1>",.... ) instead of "<KeyRelease>" to get the col and line for the mouse position.

P.S i didn't see the example sry for that
My site ->> http://8masterofpuppets8.webs.com/
"My belief is stronger than your doubt."
Reply With Quote Quick reply to this message  
Reply

Tags
line, number, scrolledtext

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC