|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
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. Thanks again. Last edited by Nick889 : January 10th, 2004 at 11:45 PM. |
|
#2
|
||||
|
||||
|
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 Mark |
|
#3
|
||||
|
||||
|
Hi Nick,
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. Code:
if not self.text.tag_ranges(SEL):
#copy everything
self.text.tag_add(SEL,'1.0',END)
text = self.text.get(SEL_FIRST,SEL_LAST)
self.text.tag_remove(SEL,'1.0',END)
self.parent.clipboard_clear()
self.parent.clipboard_append(text)
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Tkinter help (warning: noobish question) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|