I know this is a vanilla question but probably it will be easy to answer by someone.
I want to set the text to a TextBox (for a progressbar, to follow what’s going on) but I can’t get it updated. Any help?
from vanilla import *
from time import sleep
class Test():
def __init__ (self):
self.w = Window((200, 100), 'a W')
self.w.text = TextBox((10, 10, -10, -10), 'start')
self.w.open()
# set text
self.counter = 0
while self.counter < 10:
print self.counter
self.w.text.set(self.counter)
sleep(1)
self.counter += 2
else:
print 'finished counting'
Test()