Re: Simple TK Question - refreshing the canvas when not in focus

2008-05-02 Thread Eric Brunel
On Wed, 30 Apr 2008 20:19:32 +0200, blaine <[EMAIL PROTECTED]> wrote: On Apr 30, 10:41 am, Peter Otten <[EMAIL PROTECTED]> wrote: blaine wrote: > Still doesn't work. I'm looking into using wx instead... > This is the full code - does it work for anyone else? Just do a echo > 'line 0 0 10 10'

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread blaine
On Apr 30, 10:41 am, Peter Otten <[EMAIL PROTECTED]> wrote: > blaine wrote: > > Still doesn't work. I'm looking into using wx instead... > > > This is the full code - does it work for anyone else? Just do a echo > > 'line 0 0 10 10' > dev.file > > Haven't tried it, but I think that the problem is

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread blaine
On Apr 30, 10:41 am, Peter Otten <[EMAIL PROTECTED]> wrote: > blaine wrote: > > Still doesn't work. I'm looking into using wx instead... > > > This is the full code - does it work for anyone else? Just do a echo > > 'line 0 0 10 10' > dev.file > > Haven't tried it, but I think that the problem is

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Peter Otten
blaine wrote: > Still doesn't work. I'm looking into using wx instead... > > This is the full code - does it work for anyone else? Just do a echo > 'line 0 0 10 10' > dev.file Haven't tried it, but I think that the problem is that you are updating the UI from the "readthread". A good example to

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread blaine
Still doesn't work. I'm looking into using wx instead... This is the full code - does it work for anyone else? Just do a echo 'line 0 0 10 10' > dev.file import sys, os, time, Tkinter, threading class nokia_fkscrn(Tkinter.Toplevel): fp=None def __init__(self, file): self.fname

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Eric Brunel
On Wed, 30 Apr 2008 10:58:06 +0200, Robert.Spilleboudt <[EMAIL PROTECTED]> wrote: blaine wrote: Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Robert.Spilleboudt
blaine wrote: Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is well, except one thing. When I am not in the program, and the program receives a draw

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Eric Brunel
On Tue, 29 Apr 2008 17:09:18 +0200, blaine <[EMAIL PROTECTED]> wrote: [snip] I'll try the update() again. I would want to use that on the canvas itself right? Not the root window? Well, in fact, there is no difference at all... In tcl/tk, update is a function, and isn't applied to a particul

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-29 Thread blaine
On Apr 29, 10:36 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote: > On Tue, 29 Apr 2008 15:22:12 +0200, blaine <[EMAIL PROTECTED]> wrote: > > Hey everyone! > > I'm not very good with Tk, and I am using a very simple canvas to > > draw some pictures (this relates to that nokia screen emulator I had a

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-29 Thread Eric Brunel
On Tue, 29 Apr 2008 15:22:12 +0200, blaine <[EMAIL PROTECTED]> wrote: Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is well, except one thing. When

Simple TK Question - refreshing the canvas when not in focus

2008-04-29 Thread blaine
Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is well, except one thing. When I am not in the program, and the program receives a draw command (from a

Re: TK question

2005-10-21 Thread jepler
In the FileDialog module there are both LoadFileDialog and SaveFileDialog. Is the latter what you want? Jeff pgptzMbfYw5VI.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: TK question

2005-10-20 Thread MBW
thank you very much, I have one more question that is tk related, I've use tkfileopendialog or whatever that name is to select files is there also a dialog for creating files, well not really creating them but allowing the same look and feel as many porgrams give for saving files? is there also

Re: TK question

2005-10-20 Thread James Stroud
Forgot to answer the "better" part: class optFrame(Frame): def __init__(self, *args, **kwargs): Frame.__init__(self, *args, **kwargs) self.pack() self.make_widgets() def make_widgets(self): """ Put widgets here. """ pass def main(): tk = Tk() opt

Re: TK question

2005-10-20 Thread James Stroud
optWin() will create a callable object which is an instance of the class optWin. Calling this callable object will call the __call__() method with the behavior you anticipate. You also need to import Tk from Tkinter and call Tk "Tk" and not "tk". Meditate on the following : from Tkinter impor

TK question

2005-10-20 Thread MBW
I have a class that is a windows in a GUI the following is the code: class optWin: def __init__(self): return None def __call__(self): self.root = tk() self.root.title("My title") self.root.mainloop() return None 1)Why doesn't this work when I go