two labels in the window but in diferent time

R

rrosa

Hi there,
I am trying to create a window that appears one label1="First Message" and after
of 3,4 seconds I would like to append another label in the same window
label2="Second Message" bellow of the first label, but I can only show both
labels in the same time, and not in diferent time in the same window, someone
knows something about???
Gratefully!

----> my code:
from anygui import *
import win32api


# Make components here
app = Application()
# Add components to the Window
w = Window()
w.set(title='Hello, again', size=(300,200))
lab = Label(text='Hello, again!', position=(10,10))
lab1 = Label(text='Hello, again!', position=(10,40))

app.add(w)
w.add(lab)
win32api.Sleep(2000)
w.add(lab1)
app.run()
 
D

Dennis Lee Bieber

app.add(w)
w.add(lab)
win32api.Sleep(2000)
w.add(lab1)
app.run()
Your application probably doesn't display until the run() is
invoked. Everything before that is just set-up of hidden items.

I suspect what you need to do is put a timer of some sort into
the .run() system, and let the expiration of the timer perform the
add().

--
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top