Re: Syntax Highlighting in a tkinter Text widget

2014-10-07 Thread Nicholas Cannon
Sweet thanks for the help many I am defiantly going to use these. -- https://mail.python.org/mailman/listinfo/python-list

Syntax Highlighting in a tkinter Text widget

2014-10-06 Thread Nicholas Cannon
Hey guys Im working on an open source text editor(https://github.com/nicodasiko/Text-Config-2) and I would like to add syntax highlighting(mainly for python code). I have built the editor in python and the text input is a Text tkinter widget. I know how to add tags and highlight things but Im

Re: Syntax Highlighting in a tkinter Text widget

2014-10-06 Thread Christian Gollwitzer
Am 07.10.14 07:35, schrieb Nicholas Cannon: Hey guys Im working on an open source text editor(https://github.com/nicodasiko/Text-Config-2) and I would like to add syntax highlighting(mainly for python code). I have built the editor in python and the text input is a Text tkinter widget. I know

Tkinter Text Widget Background Color

2011-02-22 Thread Sathish S
Hi Ppl, I'm using the Tkinter Text Widget in my user interface. I'm trying to create a blinking effect for this Text Widget. I saw from the documentation I can set the color if the widget when I create it. x=Text(root,bg='#CFF') However, I couldn't find any property or function that set's

Re: Tkinter Text Widget Background Color

2011-02-22 Thread Peter Otten
Sathish S wrote: Hi Ppl, I'm using the Tkinter Text Widget in my user interface. I'm trying to create a blinking effect for this Text Widget. I saw from the documentation I can set the color if the widget when I create it. x=Text(root,bg='#CFF') However, I couldn't find any property

Re: Tkinter Text Widget Background Color

2011-02-22 Thread Terry Reedy
On 2/22/2011 6:50 AM, Peter Otten wrote: import Tkinter as tk from itertools import cycle root = tk.Tk() text = tk.Text(root, font=(Helvetica, 70)) text.pack() text.insert(tk.END, Hello, geocities) text.tag_add(initial, 1.0, 1.1) text.tag_add(initial, 1.7, 1.8) colors = cycle(red yellow

Re: Tkinter Text Widget Background Color

2011-02-22 Thread Jeff Hobbs
On Feb 22, 8:48 am, Terry Reedy tjre...@udel.edu wrote: On 2/22/2011 6:50 AM, Peter Otten wrote: import Tkinter as tk from itertools import cycle root = tk.Tk() text = tk.Text(root, font=(Helvetica, 70)) text.pack() text.insert(tk.END, Hello, geocities) text.tag_add(initial, 1.0,

Re: Tkinter Text Widget Background Color

2011-02-22 Thread Peter Otten
Terry Reedy wrote: On 2/22/2011 6:50 AM, Peter Otten wrote: import Tkinter as tk from itertools import cycle root = tk.Tk() text = tk.Text(root, font=(Helvetica, 70)) text.pack() text.insert(tk.END, Hello, geocities) text.tag_add(initial, 1.0, 1.1) text.tag_add(initial, 1.7, 1.8)

Re: Tkinter Text Widget Background Color

2011-02-22 Thread Sathish S
Jeff, Thanks a lot. It worked great for me as well. Thanks, Sathish On Tue, Feb 22, 2011 at 10:28 PM, Jeff Hobbs jeff.ho...@gmail.com wrote: On Feb 22, 8:48 am, Terry Reedy tjre...@udel.edu wrote: On 2/22/2011 6:50 AM, Peter Otten wrote: import Tkinter as tk from itertools import

Re: Tkinter Text Widget Background Color

2011-02-22 Thread Sathish S
Oops, i got the wrong person. Thanks Peter. I was able to achieve the blinking functionality. Thanks, Sathish On Tue, Feb 22, 2011 at 10:44 PM, Peter Otten __pete...@web.de wrote: Terry Reedy wrote: On 2/22/2011 6:50 AM, Peter Otten wrote: import Tkinter as tk from itertools import

Tkinter Text widget get()

2008-07-05 Thread Alex Bryan
Hey guys. I am having trouble understanding the get() method from the Tkinter Text() widget. It isn't like the entry.get() one I am used to. I know you have to put tags in, or at least I read. I tried this but it didn't work. I think I was putting the tags in wrong but I am not sure. I

Re: Tkinter Text widget get()

2008-07-05 Thread John McMoangle
Hey guys. I am having trouble understanding the get() method from the Tkinter Text() widget. It isn't like the entry.get() one I am used to. I know you have to put tags in, or at least I read. I tried this but it didn't work. I think I was putting the tags in wrong but I am not sure

Margins in the Tkinter Text widget

2008-07-05 Thread Alex Bryan
Okay, so i am trying to have some sort of formatting going on in a textbox, and I need left margins. I see that there are two, one for the first line and th other for every line but that line. My program gives a word and a list of definitions for the word. So my question is how can I make

Tkinter Text widget

2008-03-27 Thread MartinRinehart
Is there a way of translating from the Text widget's width/height (in characters) to pixels so you can open an appropriately sized window? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter text widget

2007-10-08 Thread goldtech
On Oct 7, 11:00 am, Simon Forman [EMAIL PROTECTED] wrote: On Oct 6, 11:18 pm, goldtech [EMAIL PROTECTED] wrote: I thought the DISABLED made it so I could not edit it. But it also makes it so I can not scroll down. If you make the window smaller than the content then try to put a cursor

Re: Tkinter text widget

2007-10-08 Thread goldtech
After some Google searching I found ScrolledText, this does what I want :^) from Tkinter import * from ScrolledText import ScrolledText root = Tk() text = ScrolledText(root, font=(Courier)) ScrolledText text.pack() i='123456789abcdefghijklmnopqrstuvwxyz\n' for x in range(30):

Re: Tkinter text widget

2007-10-07 Thread ezd
On Oct 6, 11:18 pm, goldtech [EMAIL PROTECTED] wrote: I thought the DISABLED made it so I could not edit it. But it also makes it so I can not scroll down. If you make the window smaller than the content then try to put a cursor in there to use up/down arrow you can't. What I want is not to

Re: Tkinter text widget

2007-10-07 Thread goldtech
You can scroll, but you can't see the cursor. Use for x in range(30): text.insert(END, %3d % x + i) to check. ED I tried it w/the line numbers. On my system I see 0-23. But there is no way to scroll. Still the same result. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter text widget

2007-10-07 Thread Simon Forman
On Oct 6, 11:18 pm, goldtech [EMAIL PROTECTED] wrote: I thought the DISABLED made it so I could not edit it. But it also makes it so I can not scroll down. If you make the window smaller than the content then try to put a cursor in there to use up/down arrow you can't. What I want is not to

Tkinter text widget

2007-10-06 Thread goldtech
I thought the DISABLED made it so I could not edit it. But it also makes it so I can not scroll down. If you make the window smaller than the content then try to put a cursor in there to use up/down arrow you can't. What I want is not to be able to change text content, but no other action is

No output from popen in Tkinter text widget

2006-12-11 Thread Kevin Walzer
I'm trying to display the output of an external process (invoked via popen) in a Tkinter text widget. I successfully start the process (based on what I'm seeing in my terminal output), but I can't get the output to display in the Tkinter widget. It seems to block. Any ideas? My code is below

Re: No output from popen in Tkinter text widget

2006-12-11 Thread John McMonagle
Kevin Walzer wrote: I'm trying to display the output of an external process (invoked via popen) in a Tkinter text widget. I successfully start the process (based on what I'm seeing in my terminal output), but I can't get the output to display in the Tkinter widget. It seems to block. Any

Tkinter Text widget incremental search

2006-09-28 Thread Bob Greschke
I want to create a search function on a Text() widget full of text like the incremental search in emacs -- if you type an f emacs goes to the first f, type another f and it goes to the first place where ff shows up in the text, etc. How would you search the text of the Text() for a string like

Re: Selection in Tkinter Text widget.

2006-06-03 Thread greg
Ant wrote: Strange behaviour though (IMHO), that the selection is only shown if the widget has focus. It's only strange if you're used to certain platforms. This is normal behaviour in the Macintosh world. One of the original Apple UI Guidelines was that there should only be one selection

Selection in Tkinter Text widget.

2006-06-02 Thread Ant
Hi all, I have been trying to select text in a Text widget programmatically. I have been trying the following minimal example: #= from Tkinter import * def showgui(): win = Tk() area = Text(win, width = 50, height = 20) area.pack() new = Lots of

Re: Selection in Tkinter Text widget.

2006-06-02 Thread Fredrik Lundh
Ant [EMAIL PROTECTED] wrote: I have been trying to select text in a Text widget programmatically. I have been trying the following minimal example: #= from Tkinter import * def showgui(): win = Tk() area = Text(win, width = 50, height = 20)

Re: Selection in Tkinter Text widget.

2006-06-02 Thread Ant
Fredrik Lundh wrote: ... it does, but by default, the selection is only shown for widgets that has the key- board focus. if you add an explicit focus_set() call, you'll see the selection. /F Perfect! Thanks Fredrik. Strange behaviour though (IMHO), that the selection is only shown if

fontifying a pattern in a Tkinter Text widget

2005-08-27 Thread [EMAIL PROTECTED]
Hi, I'm writing a program which needs to change various format features of a specific pattern (remote_user for example) withing a Text widget. This pattern could potentially be anywhere within the widget. I'm unsure of how to implement the various tag methods, so a little push in the right

Re: tkinter text widget question

2005-08-21 Thread William Gill
rafi wrote: William Gill wrote: The tkinter text widget uses indexes to identify row:column offsets within the text, but it seems counter intuitive to have to convert row and column integers to a string like 0.1'. It's great that index can take a string, but what about looping through

tkinter text widget question

2005-08-21 Thread William Gill
The tkinter text widget uses indexes to identify row:column offsets within the text, but it seems counter intuitive to have to convert row and column integers to a string like 0.1'. It's great that index can take a string, but what about looping through rows and columns? Am I missing a way

Re: tkinter text widget question

2005-08-21 Thread rafi
William Gill wrote: The tkinter text widget uses indexes to identify row:column offsets within the text, but it seems counter intuitive to have to convert row and column integers to a string like 0.1'. It's great that index can take a string, but what about looping through rows and columns