M?m widget Entry a ve funkci do n?j vkl?d?m text...Ale v?e se mi vyp??e a? na konci funkce.. Pot?ebuji, aby se widget jaksi Refreshoval... Mo?n? by to ?lo pomoc? after... ale nevím jak....?:((? plspls help me
Fórum › Python
Refresh widgetu

plsplsplsplslplsplspls
Já prostě chci aby program chvilku(např 20 milisekund) nic nedělal, ale ne jako pomocí time.sleep ale jako pomocí root.after.. Prostě aby nic nedělal i když by něco mohl dělat... To je těžké vysvětlování...
Tak znova...chce? k?d?Tad m??..
from Tkinter import *
def h():
import time
l["text"]="prvni text"
# tady nastava problem.Nenapise se "prvni text",ale jen to pocka 5 vterin a napise "druhy text"
time.sleep(5.0)
l["text"]="druhy text"
root=Tk()
l=Label(okno)
l.pack()
Button(root,text="text",command=h).pack()
V jednom pripade(konkretne ten zamacknuty button, co ti tam zustane 5 vterin zamackly) jsem to vy?e?il pomoc? room.after. Ale tady by to ne?lo... Pon?vad? na 20 stejn?ch 2 ??dek textu se mi nechce por?d odsazovat..
geon napsal:
1/ tvůj kod nefunguje :-(
[i]2/ root.update()[/i]
1/-->Už jsem si to taky uvědomil... Psal jsem ho narychlo a nezkoušel.
[i]2/-->[/i]Díky :super:

Přidej příspěvek
Toto téma je starší jak čtvrt roku – přidej svůj příspěvek jen tehdy, máš-li k tématu opravdu co říct!
Ano, opravdu chci reagovat → zobrazí formulář pro přidání příspěvku
×Vložení zdrojáku
×Vložení obrázku
×Vložení videa
Aktuálně jsou podporována videa ze serverů YouTube, Vimeo a Dailymotion.
×






























































Uživatelé prohlížející si toto vlákno
Uživatelé on-line: 0 registrovaných, 32 hostů
Podobná vlákna
Qt dědičnost tříd widgetů — založil apachenda
Mazání widgetů z jednoho okna — založil Arthas
FF - refresh — založil bbtrash
REFRESH V FF — založil leon
Refresh stranky — založil fefe
Moderátoři diskuze