Vanilla set.text to TextBox

  • 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')
            # set text
            self.counter = 0
            while self.counter < 10:
                print self.counter
                self.counter += 2
                print 'finished counting'

  • admin

    can you use the defconAppKit progressWindow?


    Cocoa is build up rather smart so it checks when a view is been updated frequently before redrawing it on screen.

    Although you can force a redraw:


    after setting a string into the TextBox