[Gambas-user] Refresh question
gambas at ...1...
Wed Feb 26 11:53:56 CET 2003
Le Mercredi 26 Février 2003 10:21, Davide Di Buduo a écrit :
> Hi everybody,
> first of all thanks everyone for the good job with Gambas,
> (i'm running it without any problem under Mandrake 9.0, Kde 3.1 and Qt
> I've a question about forms: how can i refresh a form in the middle of an
> event ?? i.e. i'm in a button_click event, i make some changes to some
> other controls in the form but the actual result isn't visible until the
> event ends
> Is there a way to redraw the form within an event ??
> Thanks everybody for the help and greetings from Italy !!!
You cannot refresh a form "in the middle of a event", because refreshing a
widget is in fact answering a event, and you cannot answer two events at the
same time !
Fortunately, You can use the WAIT instruction in your event handler. This
instruction calls recursively the event loop, so the refresh events can be
processed inside your event handler.
But be careful, calling the event loop can imply the call of your event
handler, and lead to a infinite recursion and a stack overflow.
mailto:gambas at ...1...
More information about the User