January 10th, 2004, 06:37 PM
Tkinter help (warning: noobish question)
ok, i have edited this post now.
I managed to figure out how to change the fonts and size, and all thats left is to figure out how to cut/copy/paste text and also limit it with selected text and if no text is highlighted then everything in the text box will be effected. By selected/highlighted i mean where you drag your cursor over it and it becomes blue you know.
Thanks for the help, and it is greatly appreciated. Incase your wondering its for an email program for my dad. If it turns out to be good i may release it as open source publicly. If I can get the help i need from someone i will even give you half credit to the program as well.
Last edited by Nick889; January 10th, 2004 at 11:45 PM.
January 11th, 2004, 02:57 AM
Sad to say but there doesn't seem to be that much about Tkinter online, probably better of with a book like "Programming Python"...
Anyway they best link i've found for TK is on http://www.pythonware.com/library/index.htm
January 12th, 2004, 09:14 AM
The code fragment may help a bit - it copies to the clipboard selected text or if no range selected then all the text. After copying the text the highlighting is removed.
self.text is a tk multiline ScrolledText box.
if not self.text.tag_ranges(SEL):
text = self.text.get(SEL_FIRST,SEL_LAST)