[Tutor] Clock in tkinter?

Wayne Werner waynejwerner at gmail.com
Wed Nov 16 20:38:30 CET 2011


On Wed, Nov 16, 2011 at 11:44 AM, Mic <o0MB0o at hotmail.se> wrote:

>   I wonder if you have any suggestions regarding how to place widgets in
> my window.
>
 Even though I try to arrange them as orderly as possible they get placed
> at all different kind of places in the window.
> I use the grid method and place them in the window by using row=something
> and column=something.
>
> It just doesn’t look good. It looks okay I suppose, but not as good as I
> want it to look.
>

 http://twitpic.com/2t4n9q/full
 http://twitpic.com/2t4n9p/full

Those images might help you understand a little bit more about the grid
layout.


> So if I got it right. Inside the constructor (__init__) I should declare:
> self.the_time=’’
> Then, if I understood it right, I should also place the function call
> there?
> self.update_time() as you refered to?
>

Your constructor should look something like this:

def __init__(self):
    #Your call to super
    self.the_time = ''
    # your other code
    self.update_time()

I don't know for sure that it will work, but I expect that it will.

HTH,
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111116/2cdc9e88/attachment.html>


More information about the Tutor mailing list