2005-04-11, 09:40
hi
i've been trying to use a textbox as progress/status indicator. however, the gui doesn't draw the status text when i want it to. is there anyway of forcing the gui to redraw the screen?
to be more specific. in my ooba script i have a list of menuitems. when the user clicks an normal menuitem i do the following
* removecontrol(list)
* addcontrol(textbox)
* textbox.settext("reading url:"+url)
* reset list and add new sub items
* removecontrol(textbox)
* addcontrol(list)
and that works fine. but when the user clicks an url to a jpg, then the flow is different:
* removecontrol(list)
* addcontrol(textbox)
* textbox.settext("downloading image:"+url)
* urllib.urlretrieve(....)
* image=....
* removecontrol(textbox)
* addcontrol(image)
and that does not work. the list is removed while downloading and the image ends up being displayed but there is no status text in the mean time.
i've been trying to use a textbox as progress/status indicator. however, the gui doesn't draw the status text when i want it to. is there anyway of forcing the gui to redraw the screen?
to be more specific. in my ooba script i have a list of menuitems. when the user clicks an normal menuitem i do the following
* removecontrol(list)
* addcontrol(textbox)
* textbox.settext("reading url:"+url)
* reset list and add new sub items
* removecontrol(textbox)
* addcontrol(list)
and that works fine. but when the user clicks an url to a jpg, then the flow is different:
* removecontrol(list)
* addcontrol(textbox)
* textbox.settext("downloading image:"+url)
* urllib.urlretrieve(....)
* image=....
* removecontrol(textbox)
* addcontrol(image)
and that does not work. the list is removed while downloading and the image ends up being displayed but there is no status text in the mean time.