Tkinter from Vis. BASIC

Discussion in 'Python' started by Terrance N. Phillip, Nov 19, 2005.

  1. In VB, an easy way I indicate progress is something like
    do while <some process is not met>
    lblNotify.foreground = randomcolor
    lblNotify.refresh <-----------
    <sleep>
    loop

    I want to do the same thing in Python/Tkinter:

    # Wait for network to recognize the workstation:
    while os.system("slist") != 0:
    self.notify["fg"] = randcolor()
    # how do I refresh label l3 at this point?
    time.sleep(3)

    I've tried self.notify.grid() (I'm using the grid geometry manager
    throughout), but that didn't work, and there is no redraw() or refresh()
    method that I can see.
    Terrance N. Phillip, Nov 19, 2005
    #1
    1. Advertising

  2. Terrance N. Phillip

    Guest

    Terrance N. Phillip wrote:
    > In VB, an easy way I indicate progress is something like
    > do while <some process is not met>
    > lblNotify.foreground = randomcolor
    > lblNotify.refresh <-----------
    > <sleep>
    > loop
    >
    > I want to do the same thing in Python/Tkinter:
    >
    > # Wait for network to recognize the workstation:
    > while os.system("slist") != 0:
    > self.notify["fg"] = randcolor()
    > # how do I refresh label l3 at this point?
    > time.sleep(3)
    >
    > I've tried self.notify.grid() (I'm using the grid geometry manager
    > throughout), but that didn't work, and there is no redraw() or refresh()
    > method that I can see.


    I know of an update_idletask() method, look it up in the tkinter doc to
    see if that's what you need!
    , Nov 19, 2005
    #2
    1. Advertising

  3. wrote:

    >>I want to do the same thing in Python/Tkinter:
    >>
    >> # Wait for network to recognize the workstation:
    >> while os.system("slist") != 0:
    >> self.notify["fg"] = randcolor()
    >> # how do I refresh label l3 at this point?
    >> time.sleep(3)


    > I know of an update_idletask() method, look it up in the tkinter doc to
    > see if that's what you need!
    >

    Thanks. I did a dir(label_object) and saw update() and
    update_idletasks(). updeate() seems to do the trick.
    Terrance N. Phillip, Nov 19, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. K. Abit
    Replies:
    1
    Views:
    373
    Rad [Visual C# MVP]
    Nov 25, 2006
  2. =?Utf-8?B?SmVhbi1DaHJpc3RpYW4=?=

    Problem with XHTML validation in visual studio 2005 on windows vis

    =?Utf-8?B?SmVhbi1DaHJpc3RpYW4=?=, Dec 14, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    326
    =?Utf-8?B?SmVhbi1DaHJpc3RpYW4=?=
    Dec 14, 2006
  3. Replies:
    0
    Views:
    321
  4. Replies:
    4
    Views:
    430
    Jeff Winn
    May 31, 2008
  5. cheap VIS VIM

    , Jul 19, 2008, in forum: Python
    Replies:
    0
    Views:
    280
Loading...

Share This Page