Re: [tkinter] question about correct use of validation

2019-01-17 Thread steve
Il 17/01/19 14:08, Peter Otten ha scritto: Alternatives: - If you know that you'll always just call pack() you can change the make_entry() method accordingly def make_entry(...): ... entry.pack() return entry - Write a helper function def pack(widget): widget.pack()

Re: [tkinter] question about correct use of validation

2019-01-17 Thread Peter Otten
steve wrote: > Il 17/01/19 14:08, Peter Otten ha scritto: > >> Two remarks: >> >>> self.id1_entry = self.make_entry(self.parent, maxlen=1).pack() >> >> You set all idX_entry attributes to None, as that's what pack() returns. > > you mean.. > > self.idx_entry = self.make_entry(self.p

Re: [tkinter] question about correct use of validation

2019-01-17 Thread steve
Il 17/01/19 14:08, Peter Otten ha scritto: Two remarks: self.id1_entry = self.make_entry(self.parent, maxlen=1).pack() You set all idX_entry attributes to None, as that's what pack() returns. you mean.. self.idx_entry = self.make_entry(self.parent, width=50, maxlen=30, highligh

Re: [tkinter] question about correct use of validation

2019-01-17 Thread Peter Otten
steve wrote: > Il 16/01/19 08:51, Peter Otten ha scritto: > >> def make_ui(self): >> ''' create user interface ''' >> >> def vcmd(maxlength): >> return self.parent.register( >> partial(self.maxlength_validate, maxlength=maxlength) >>

Re: [tkinter] question about correct use of validation

2019-01-17 Thread steve
Il 16/01/19 08:51, Peter Otten ha scritto: def make_ui(self): ''' create user interface ''' def vcmd(maxlength): return self.parent.register( partial(self.maxlength_validate, maxlength=maxlength) ), "%P" ... ok following your

Re: [tkinter] question about correct use of validation

2019-01-16 Thread Peter Otten
steve wrote: > for determine the maximum number of characters in an entry > > I have read several interpretations for the solution of the problem, but > I wanted to find an alternative way (for convenience of the code) > > I kindly ask for an opinion on the use of validation in this way. > > --

Re: [tkinter] question about correct use of validation

2019-01-15 Thread steve
On 15/01/2019 14:16, Rick Johnson wrote: steve wrote: Then it's just a matter of passing a keyword argument: myEntry = MyEntry(master, maxlen=20) What you have above is a tightly coiled, steaming dogpile that will litter your code base. Encapsulate that stench, would ya? sure, everyth

[tkinter] question about correct use of validation

2019-01-15 Thread steve
for determine the maximum number of characters in an entry I have read several interpretations for the solution of the problem, but I wanted to find an alternative way (for convenience of the code) I kindly ask for an opinion on the use of validation in this way. - problem: limit number

Re: [Newbie] Tkinter Question

2016-02-25 Thread Randy Day
In article , best_...@yahoo.com says... [snip] > Anyway, I am happy with the outcome even though I have > not found a way to detect when the program is force > killed. It is unlikely that would ever occur as long When your peogram starts, have it create a small file. As part of your graceful s

Re: [Newbie] Tkinter Question

2016-02-24 Thread Wildman via Python-list
On Tue, 23 Feb 2016 16:19:43 -0600, Wildman wrote: > Thanks to Christian and Chris. You both gave me much to think about and to experiment with. That adds to my on-going learning experience. This is the first thing I tried: The Exit button has this: command=self.quit Then I have this: def

Re: [Newbie] Tkinter Question

2016-02-23 Thread Chris Kaynor
On Tue, Feb 23, 2016 at 2:19 PM, Wildman via Python-list < python-list@python.org> wrote: > I am familiar with OO programming but I am new to Python > and Tkinter. I am working on a gui program that creates > a couple of temporary files. As part of the Exit button > command they are deleted. If

Re: [Newbie] Tkinter Question

2016-02-23 Thread Christian Gollwitzer
Am 23.02.16 um 23:19 schrieb Wildman: I am familiar with OO programming but I am new to Python and Tkinter. I am working on a gui program that creates a couple of temporary files. As part of the Exit button command they are deleted. If the program is shut down using the window close button [X]

[Newbie] Tkinter Question

2016-02-23 Thread Wildman via Python-list
I am familiar with OO programming but I am new to Python and Tkinter. I am working on a gui program that creates a couple of temporary files. As part of the Exit button command they are deleted. If the program is shut down using the window close button [X], the exit button code is not executed a

Re: Tkinter question

2010-04-23 Thread Rotwang
eb303 wrote: On Apr 23, 1:58 pm, Rotwang wrote: [...] I didn't. How do I get Python to display the draw window, other than by using mainloop()? Well, mainloop doesn't actually display anything. It's just the event loop for tk. So since you run your program within IDLE, there is already one

Re: Tkinter question

2010-04-23 Thread eb303
On Apr 23, 1:58 pm, Rotwang wrote: > eb303 wrote: > > On Apr 22, 5:55 pm, Rotwang wrote: > > >> [...] > > > From my experience, mixing Tkinter with threads is a bad idea. As most > > GUI toolkits, it really doesn't like to be manipulated from different > > threads, so you might end up getting wei

Re: Tkinter question

2010-04-23 Thread Rotwang
eb303 wrote: On Apr 22, 5:55 pm, Rotwang wrote: [...] From my experience, mixing Tkinter with threads is a bad idea. As most GUI toolkits, it really doesn't like to be manipulated from different threads, so you might end up getting weird problems or even crashes. By the way, did you try to

Re: Tkinter question

2010-04-23 Thread eb303
On Apr 22, 5:55 pm, Rotwang wrote: > James Mills wrote: > > On Wed, Apr 21, 2010 at 8:45 PM, Rotwang wrote: > > >> [...] > > >>From reading the documentation myself (pydoc)... > > > It would seem your only option is to make a thread > > out of this (not my preferred way - I was hoping it was > >

Re: Tkinter question

2010-04-22 Thread Rotwang
eb303 wrote: On Apr 21, 12:45 pm, Rotwang wrote: [...] Just run your program directly, either from a terminal or a DOS console or by double-clicking on it in a file manager if the proper file associations have been defined (they are by default on Windows). Thanks for the suggestion, but I

Re: Tkinter question

2010-04-22 Thread Rotwang
James Mills wrote: On Wed, Apr 21, 2010 at 8:45 PM, Rotwang wrote: [...] From reading the documentation myself (pydoc)... It would seem your only option is to make a thread out of this (not my preferred way - I was hoping it was possible to poll the Tk event system...). Thanks, I don't

Re: Tkinter question

2010-04-21 Thread eb303
On Apr 21, 12:45 pm, Rotwang wrote: > Apologies in advance if this is a totally stupid question, I've tried > looking at the Tkinter documentation on the web but since I'm something > of an ignoramus when it comes to programming generally I didn't > understand what I was reading. Anyway... > > I'v

Re: Tkinter question

2010-04-21 Thread James Mills
On Wed, Apr 21, 2010 at 8:45 PM, Rotwang wrote: > def draw(self, w, h): >        out = Tkinter.Canvas(width = w, height = h) >        # a load of out.create_line(...)'s go here >        out.pack() >        out.mainloop() > > It works, but the problem is that I can't do anything else with IDLE unti

Tkinter question

2010-04-21 Thread Rotwang
Apologies in advance if this is a totally stupid question, I've tried looking at the Tkinter documentation on the web but since I'm something of an ignoramus when it comes to programming generally I didn't understand what I was reading. Anyway... I've written a module that allows me to manipul

Re: tkinter question

2008-12-01 Thread [EMAIL PROTECTED]
On Oct 26, 7:02 am, "Chuckk Hubbard" <[EMAIL PROTECTED]> wrote: > Hello. > How about this?  I changed the if statements so the coordinates are > always updated, but only changed if within the right limits, otherwise > updated to the existing value.  Now if you drag outside the limits of > one dimen

Re: tkinter question

2008-12-01 Thread [EMAIL PROTECTED]
On Oct 26, 7:02 am, "Chuckk Hubbard" <[EMAIL PROTECTED]> wrote: > Hello. > How about this?  I changed the if statements so the coordinates are > always updated, but only changed if within the right limits, otherwise > updated to the existing value.  Now if you drag outside the limits of > one dimen

Re: tkinter question

2008-10-26 Thread Chuckk Hubbard
Hello. How about this? I changed the if statements so the coordinates are always updated, but only changed if within the right limits, otherwise updated to the existing value. Now if you drag outside the limits of one dimension, it still moves in the other dimension. Not sure if that's what you

Tkinter question: howto redirect text output (stdout) to Text widget?

2008-10-14 Thread dmitrey
hi all, could anyone post an example how to redirect text output (stdout) to Text widget? Thank you in advance, Dmitrey. -- http://mail.python.org/mailman/listinfo/python-list

tkinter question

2008-10-03 Thread [EMAIL PROTECTED]
I saw this (close to this anyway) lieing around on the internet and was wanting to use it to define a start point exc but I need the graphics to stay within a set y coords and I am not realy sure how to do that. I have no idea on how to bind a min/max y to it. (the concept is inspired by the java

RE: tkinter question

2007-10-08 Thread Hamilton, William
> -Original Message- > From: Kevin Walzer > > See http://www.codebykevin.com/blosxom/business/phynchronicity-new.png: > this is an application I develop. The layout is all handled by "pack" > and paned windows. Where you you use "grid" in a layout like this? > I'd use a three row grid, w

Re: tkinter question

2007-10-08 Thread Eric Brunel
On Sun, 07 Oct 2007 18:09:16 +0200, Kevin Walzer <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: >> "Kevin Walzer" <[EMAIL PROTECTED]> wrote: >> >>> I find "pack" to be more flexible than "grid," so I prefer it for >>> complex layouts. "grid" is better for simple layouts. >> *does a dou

Re: tkinter question

2007-10-07 Thread Kevin Walzer
Kevin Walzer wrote: > Well, I guess it depends on your viewpoint. I find "pack" flexible > because it allows me to think in terms of top, bottom, right, and left > in terms of arranging UI elements--it's an elegant way to do it in my > view. I tend to use "grid" if I have, say, a window with se

Re: tkinter question

2007-10-07 Thread Kevin Walzer
Hendrik van Rooyen wrote: > "Kevin Walzer" <[EMAIL PROTECTED]> wrote: > >> I find "pack" to be more flexible than "grid," so I prefer it for >> complex layouts. "grid" is better for simple layouts. > > *does a double take* are you serious? - my experience is that > pack is only good for simple

Re: tkinter question

2007-10-06 Thread Hendrik van Rooyen
"Kevin Walzer" <[EMAIL PROTECTED]> wrote: > I find "pack" to be more flexible than "grid," so I prefer it for > complex layouts. "grid" is better for simple layouts. *does a double take* are you serious? - my experience is that pack is only good for simple single row or single column stuff. -

Re: tkinter question

2007-10-05 Thread Kevin Walzer
Eric Brunel wrote: > On Fri, 05 Oct 2007 14:10:57 +0200, Kevin Walzer <[EMAIL PROTECTED]> > wrote: >> "expand = 1" == "expand=TRUE"--that means the widget resizes itself >> when the window is re-sized. > > That's the theory... But what does fill=BOTH means then? And why does > expand=1 (or TRU

Re: tkinter question

2007-10-05 Thread Eric Brunel
On Fri, 05 Oct 2007 14:10:57 +0200, Kevin Walzer <[EMAIL PROTECTED]> wrote: > "expand = 1" == "expand=TRUE"--that means the widget resizes itself > when the window is re-sized. That's the theory... But what does fill=BOTH means then? And why does expand=1 (or TRUE, or True) is only needed i

Re: tkinter question

2007-10-05 Thread goldtech
> > try to change listbox.pack() to listbox.pack(expand=True, fill=BOTH) > .. is it that you want ? Yes. > > -mykhal Worked with TRUE all uppercase. Exactly what I needed. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter question

2007-10-05 Thread Kevin Walzer
Eric Brunel wrote: > > BTW, even for something that simple, using the grid geometry manager may > be easier... It is at least easier to explain: don't ask me what the > expand=1 option means, I never understood it... I just add or remove it > when the pack doesn't do what I want. The sticky op

Re: tkinter question

2007-10-05 Thread Michal Bozon
On Thu, 04 Oct 2007 20:16:14 -0700, goldtech wrote: > This works OK. But I notice that if I enlarge the window after the > script has run, the white listbox only gets "so" big while the grey > background enlarges. > > Is there a way to have it all white when I enlarge a window - like > what norma

Re: tkinter question

2007-10-05 Thread Eric Brunel
On Fri, 05 Oct 2007 05:16:14 +0200, goldtech <[EMAIL PROTECTED]> wrote: > This works OK. But I notice that if I enlarge the window after the > script has run, the white listbox only gets "so" big while the grey > background enlarges. > > Is there a way to have it all white when I enlarge a windo

tkinter question

2007-10-04 Thread goldtech
This works OK. But I notice that if I enlarge the window after the script has run, the white listbox only gets "so" big while the grey background enlarges. Is there a way to have it all white when I enlarge a window - like what normally happens? from Tkinter import * root = Tk() root.title("Dir

Re: Tkinter question

2006-10-25 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Eric Brunel wrote: > > > But Hendrik's solution is better, since it avoids the use of lambda, which > > is often difficult to understand. > > storing the button reference in a variable doesn't help if you want to use the > same callback for multiple b

Tkinter question

2006-10-24 Thread Sorin Schwimmer
Thanks for everybody's advice, on both forums (tkinter-discuss & python-list).I end up using Fredrik's Lundh solution, since, in my project, multiple buttons are using the same callback, and their creation is controlled by the interaction with the user.Thanks again,Sorin-- http://mail.python.org/m

Re: Tkinter question

2006-10-24 Thread Fredrik Lundh
Eric Brunel wrote: > But Hendrik's solution is better, since it avoids the use of lambda, which > is often difficult to understand. storing the button reference in a variable doesn't help if you want to use the same callback for multiple buttons, though... -- http://mail.python.org/mailman

Re: Tkinter question

2006-10-24 Thread Eric Brunel
On Tue, 24 Oct 2006 07:48:51 +0200, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > Sorin Schwimmer wrote: > Hi All, > > Is it possible to have a widget id while it is created? > Something like this: > > Button(root, text='...', command= lambda v=: fn(v)).grid() > > and then the function: > > d

Re: Tkinter question

2006-10-23 Thread Hendrik van Rooyen
Sorin Schwimmer wrote: Hi All, Is it possible to have a widget id while it is created? Something like this: Button(root, text='...', command= lambda v=: fn(v)).grid() and then the function: def fn(v): v['bg']='BLUE' # or maybe nametowidget(v)['bg']='BLUE' Thanks, Sorin - just give the t

Tkinter question

2006-10-23 Thread Sorin Schwimmer
Hi All,Is it possible to have a widget id while it is created?Something like this:Button(root, text='...', command= lambda v=: fn(v)).grid()and then the function:def fn(v):  v['bg']='BLUE' # or maybe nametowidget(v)['bg']='BLUE'Thanks,Sorin-- http://mail.python.org/mailman/listinfo/python-list

Re: simple script - Tkinter question.

2006-07-03 Thread Eric Brunel
On Tue, 04 Jul 2006 05:02:39 +0200, jkuo22 <[EMAIL PROTECTED]> wrote: > Hi everyone, > > Here is my simple Tkinter script: > > ## start of entry.py > from Tkinter import * > root=Tk() > e1=Entry(root, width=16) > e1.pack() > e2=Entry(root, width=16) > e2.pack() > mainloop() > ## end > > First, it

simple script - Tkinter question.

2006-07-03 Thread jkuo22
Hi everyone, Here is my simple Tkinter script: ## start of entry.py from Tkinter import * root=Tk() e1=Entry(root, width=16) e1.pack() e2=Entry(root, width=16) e2.pack() mainloop() ## end First, it works on win2k. When I run it as 'python entry.py' on linux, both 'e1' and 'e2' appear perfectly e

simple script - Tkinter question.

2006-07-03 Thread jkuo22
Hi everyone, Here is my simple Tkinter script: ## start of entry.py from Tkinter import * root=Tk() e1=Entry(root, width=16) e1.pack() e2=Entry(root, width=16) e2.pack() mainloop() ## end First, it works on win2k. When I run it as 'python entry.py' on linux, both 'e1' and 'e2' appear perfectly e

Re: Newb Tkinter Question: Object has no attribute 'tk'

2006-06-30 Thread Simon Yau
python programming newb wrote: > > I'm new to python and tkinter. I'm trying to write a program that > opens the root window with a button that then opens a toplevel window > that then has it's own widgets. I can get the new toplevel window to > open but none of the widgets appear. The console gi

Re: Newb Tkinter Question: Object has no attribute 'tk'

2006-06-30 Thread Simon Forman
python programming newb wrote: > Hi all, first post. > > I'm new to python and tkinter. I'm trying to write a program that > opens the root window with a button that then opens a toplevel window > that then has it's own widgets. I can get the new toplevel window to > open but none of the widgets

Newb Tkinter Question: Object has no attribute 'tk'

2006-06-30 Thread python programming newb
Hi all, first post. I'm new to python and tkinter. I'm trying to write a program that opens the root window with a button that then opens a toplevel window that then has it's own widgets. I can get the new toplevel window to open but none of the widgets appear. The console gives me: AttributeEr

Re: Tkinter question.

2006-06-17 Thread ak
Update: I found a way to do what I want with RadioButton with option indicatoron=0 which creates a bunch of what looks like regular buttons except that when one is pressed the other one is depressed and the value of the same variable is changed. Thanks dear me. [EMAIL PROTECTED] wrote: > Hi, I'd

Tkinter question.

2006-06-17 Thread ak
Hi, I'd like to create buttons on the fly that will call the same function, and the function in question has to know what was the name of the button that called it. Unless there is a preferred way for doing this.. Perhaps creating a new function on the fly along with the new button? Please help.. t

Re: Tkinter question

2006-05-31 Thread John McMonagle
On Wed, 2006-05-31 at 11:37 -0400, david brochu jr wrote: > I am trying to create a GUI that will display a new window with > information about my program when the user clicks on the info button > (a green "i" bitmap). So far all I can get my program to do is show > the new window (using Toplevel()

Tkinter question

2006-05-31 Thread david brochu jr
I am trying to create a GUI that will display a new window with information about my program when the user clicks on the info button (a green "i" bitmap). So far all I can get my program to do is show the new window (using Toplevel() ) when the program loads, not when the user presses the informati

Re: tkinter question

2006-03-30 Thread Eric Brunel
On 30 Mar 2006 15:11:19 -0800, <[EMAIL PROTECTED]> wrote: >> If you just create >> a Toplevel and populate it with widgets, it will just display once the >> control is returned to the Tkinter mainloop and no user input will be >> needed. > > Thanks for explaining that. I borrowed the "after" method

Re: tkinter question

2006-03-30 Thread linuxnooby
>If you just create >a Toplevel and populate it with widgets, it will just display once the >control is returned to the Tkinter mainloop and no user input will be >needed. Thanks for explaining that. I borrowed the "after" method that you used in your first reply. It seems to do what I want (excep

Re: tkinter question

2006-03-30 Thread Eric Brunel
(Please quote a part of the message you're replying to; I had problems figuring out you were replying to my post...) On 29 Mar 2006 14:08:02 -0800, <[EMAIL PROTECTED]> wrote: > Ultimately what I am trying to is create a public computer session > manager. > > 1) User logs in and main application

Re: tkinter question

2006-03-29 Thread linuxnooby
Ultimately what I am trying to is create a public computer session manager. 1) User logs in and main application window is withdrawn (easy) 2) After (for example) 55 minutes - a warning window/dialoguebox "session will end in 5 minutes" 3) With 30 seconds to go - a warning window/dialoguebox "ses

Re: tkinter question

2006-03-27 Thread Eric Brunel
On 27 Mar 2006 15:15:05 -0800, <[EMAIL PROTECTED]> wrote: > Hi > > I have a tkinter question. In the following script the window will not > display until the script has finished executing. It appears at the same > time as the output "script finished". How can I make

tkinter question

2006-03-27 Thread linuxnooby
Hi I have a tkinter question. In the following script the window will not display until the script has finished executing. It appears at the same time as the output "script finished". How can I make it appear immediately, with the output "script finished" appearing 5 seconds

Re: simple TkInter question - labels

2005-12-13 Thread James Stroud
headspin wrote: > I know how to switch a label from text to an image; simply config the > image property to an existing image. > > But how do you do the opposite? Once a label displays an image, how do > you switch it back to displaying text? Setting the image property to > None doesn't seem to do

simple TkInter question - labels

2005-12-13 Thread headspin
I know how to switch a label from text to an image; simply config the image property to an existing image. But how do you do the opposite? Once a label displays an image, how do you switch it back to displaying text? Setting the image property to None doesn't seem to do the trick. By the way, I i

Re: Tkinter Question

2005-06-16 Thread Martin Franklin
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > >>Thanks for all the help guys... I'm a bit confused as to the inner >>workings of the Tkinter system (I'm both a Python and a GUI n00b). I was >>hoping that by slapping the x on button python was doing some cool >>dynamic variable creation (i.e

Re: Tkinter question

2005-06-15 Thread Fredrik Lundh
Peter Otten wrote: > Change the above function to > > def callback(text=text): > self.pressed(text) argh! -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter question

2005-06-15 Thread Peter Otten
Fredrik Lundh wrote: > note that you're assigning all buttons to the same instance variable, so > even if the above did work, it would always return a plus. > > since the command callback doesn't know what widget it was called > from, you need to create a separate callback for each widget.  here'

Re: Tkinter Question

2005-06-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Thanks for all the help guys... I'm a bit confused as to the inner > workings of the Tkinter system (I'm both a Python and a GUI n00b). I was > hoping that by slapping the x on button python was doing some cool > dynamic variable creation (i.e. creating 9 variables with

Tkinter Question

2005-06-15 Thread Nicholas . Vaidyanathan
Title: Tkinter Question Thanks for all the help guys… I'm a bit confused as to the inner workings of the Tkinter system (I'm both a Python and a GUI n00b). I was hoping that by slapping the x on button python was doing some cool dynamic variable creation (i.e. creating 9 variab

Re: Tkinter question

2005-06-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I'm sure there must be a way to do this, but I can't figure it out for > the life of me... I'm writing a program where I would like to use a > button's text field as part of an if statement. I set up my button like > this: > > i = [ "7", "8","9", "/", "4", "5", "6", "*"

Re: Tkinter question

2005-06-15 Thread Peter Otten
[EMAIL PROTECTED] wrote: [I didn't see the original post, so just in case noone mentioned it] > if(self.buttonx.title.isdigit): Nicholas, the method is not called unless you add parentheses, e. g: >>> "1".isdigit # a bound method *always* True in a boolean context >>> "1".isdigit() # True only

Re: Tkinter question

2005-06-15 Thread Martin Franklin
I realise I was a bit short on advice earlier... Martin Franklin wrote: > [EMAIL PROTECTED] wrote: > >>I'm sure there must be a way to do this, but I can't figure it out for >>the life of me… I'm writing a program where I would like to use a >>button's text field as part of an if statement. I

Re: Tkinter question

2005-06-14 Thread Martin Franklin
[EMAIL PROTECTED] wrote: > I'm sure there must be a way to do this, but I can't figure it out for > the life of me… I'm writing a program where I would like to use a > button's text field as part of an if statement. I set up my button like > this: > > i = [ "7", "8","9", "/", "4", "5", "6", "*

Tkinter question

2005-06-14 Thread Nicholas . Vaidyanathan
Title: Tkinter question I'm sure there must be a way to do this, but I can't figure it out for the life of me… I'm writing a program where I would like to use a button's text field as part of an if statement. I set up my button like this:  i = [ "7", "

Re: A smallish Tkinter question

2005-04-25 Thread Miki Tebeka
Hello Nick, > """ > What I want: A little window to open with a 0 in it. Every second, the > 0 should increment by 1. > What I get: A one second delay, see the window with a 1 in it, and then > nothing appears to happen. Never see the 0, never see a 2. Any quick > clues? Thanks. Nick. (Python 2.4

Re: A smallish Tkinter question

2005-04-21 Thread mediocre_person
***Many*** thanks. I was getting right confused, but this is pretty clear. I had also tried, in run(...): while True: sleep(1.0) ... But it's clear from your response why this also didn't work! Nick. -- http://mail.python.org/mailman/listinfo/python-list

Re: A smallish Tkinter question

2005-04-21 Thread Fredrik Lundh
Mediocre Person wrote: What I want: A little window to open with a 0 in it. Every second, the 0 should increment by 1. What I get: A one second delay, see the window with a 1 in it, and then nothing appears to happen. Never see the 0, never see a 2. Any quick clues? Thanks. Nick. (Python 2.4, Win9

Re: A smallish Tkinter question

2005-04-21 Thread Martin Franklin
[EMAIL PROTECTED] wrote: """ What I want: A little window to open with a 0 in it. Every second, the 0 should increment by 1. What I get: A one second delay, see the window with a 1 in it, and then nothing appears to happen. Never see the 0, never see a 2. Any quick clues? Thanks. Nick. (Python 2.4

Re: A smallish Tkinter question

2005-04-21 Thread Kent Johnson
[EMAIL PROTECTED] wrote: """ What I want: A little window to open with a 0 in it. Every second, the 0 should increment by 1. What I get: A one second delay, see the window with a 1 in it, and then nothing appears to happen. Never see the 0, never see a 2. Any quick clues? Thanks. Nick. (Python 2.4

A smallish Tkinter question

2005-04-21 Thread mediocre_person
""" What I want: A little window to open with a 0 in it. Every second, the 0 should increment by 1. What I get: A one second delay, see the window with a 1 in it, and then nothing appears to happen. Never see the 0, never see a 2. Any quick clues? Thanks. Nick. (Python 2.4, Win98). """ from Tkint

Re: Newbie Tkinter Question

2005-04-13 Thread Hans Georg Krauthaeuser
Peter Otten schrieb: > Pseud O'Nym wrote: > > >>the following fragment doesn't cause any errors and results in buttons the >>correct size for the images, but the buttons don't work, and the images >>aren't displayed. If I add a text property, and remove the images, they >>work fine, so the rest o

Re: Newbie Tkinter Question

2005-04-13 Thread Peter Otten
Pseud O'Nym wrote: > the following fragment doesn't cause any errors and results in buttons the > correct size for the images, but the buttons don't work, and the images > aren't displayed. If I add a text property, and remove the images, they > work fine, so the rest of my code's OK. I've searche

Re: Newbie Tkinter Question

2005-04-13 Thread Paul Rubin
"Pseud O'Nym" <[EMAIL PROTECTED]> writes: > class App: > def __init__(self, master): > frame = Frame(master) > frame.pack(side=LEFT, fill=Y) > image1 = PhotoImage(file='button_a.gif') > self.button = Button(frame, image=image1) > self.button.pack(side=TOP) > > Can anyone enli

Newbie Tkinter Question

2005-04-13 Thread Pseud O'Nym
Hi, the following fragment doesn't cause any errors and results in buttons the correct size for the images, but the buttons don't work, and the images aren't displayed. If I add a text property, and remove the images, they work fine, so the rest of my code's OK. I've searched this group and Python

Re: cosmetic Tkinter question

2005-01-03 Thread Eric Brunel
Sean McIlroy wrote: I've got a bunch of Frames, all packed into the root window with side=TOP, and in each Frame I've got a Checkbutton packed with side=LEFT. I expected the Checkbuttons to be flush with the left edge of the window, but they're not, and it looks a little gross. How do I get them to

Re: cosmetic Tkinter question

2005-01-03 Thread harold fellermann
On 26.12.2004, at 16:38, Sean McIlroy wrote: I've got a bunch of Frames, all packed into the root window with side=TOP, and in each Frame I've got a Checkbutton packed with side=LEFT. I expected the Checkbuttons to be flush with the left edge of the window, but they're not, and it looks a little gr

Re: cosmetic Tkinter question

2004-12-26 Thread Michael Fuhr
[EMAIL PROTECTED] (Sean McIlroy) writes: > I've got a bunch of Frames, all packed into the root window with > side=TOP, and in each Frame I've got a Checkbutton packed with > side=LEFT. I expected the Checkbuttons to be flush with the left edge > of the window, but they're not, and it looks a litt

cosmetic Tkinter question

2004-12-26 Thread Sean McIlroy
I've got a bunch of Frames, all packed into the root window with side=TOP, and in each Frame I've got a Checkbutton packed with side=LEFT. I expected the Checkbuttons to be flush with the left edge of the window, but they're not, and it looks a little gross. How do I get them to align? -- http://m

Re: Multithreading tkinter question

2004-12-17 Thread Eric Brunel
Oleg Paraschenko wrote: [snip] In my case "Hello" works and "Quit" doesn't (GUI stays frozen). Linux, Python 2.3.3, pygtk-0.6.9. That's not a multithreading issue, but just the way the quit method works. Try: - import time from Tkinter import * root

Re: Multithreading tkinter question

2004-12-16 Thread Oleg Paraschenko
Hello John, > Mark, > > I tried your code snippet with Python 2.3.4. Worked fine. Only problem was > that the program fell off the end and terminated before the second thread > could open the Tkinter window. So I added these lines at the end to make the > main thread wait:- > > from msvcrt import

Re: Multithreading tkinter question

2004-12-16 Thread Mark English
> Date: Thu, 16 Dec 2004 11:59:53 GMT > From: "John Pote" <[EMAIL PROTECTED]> > > "Mark English" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > Is there a safe way to run tkinter in a multithreaded app > where the mainloop runs in a background thread ? > > > I tried your code

Re: Multithreading tkinter question

2004-12-16 Thread John Pote
"Mark English" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Is there a safe way to run tkinter in a multithreaded app where the mainloop runs in a background thread ? Mark, I tried your code snippet with Python 2.3.4. Worked fine. Only problem was that the program fell off the

Multithreading tkinter question

2004-12-15 Thread Mark English
Is there a safe way to run tkinter in a multithreaded app where the mainloop runs in a background thread ? Here's some test code demonstrating the problem. I'm running Python2.4 under Windows 2000. Code snip starts- from Tkinter import * def GetTkinterThread(): im