[Gambas-user] Showing the Form's Gui

Doriano Blengino doriano.blengino at ...1909...
Tue Apr 13 15:36:16 CEST 2010


Fabien Bodard ha scritto:
> just remember to put a flag to say when the data are loaded !
>   
What would be the reason for this flag?

> 2010/4/13 richard terry <rterry at ...1946...>:
>   
>> On Tuesday 13 April 2010 20:50:26 Doriano Blengino wrote:
>>
>> Thanks doriano, that worked a treat, looks much better, will try with some
>> other  forms which have the same problem.
>>
>>
>>     
>>> richard terry ha scritto:
>>>       
>>>> Often with forms one wants to start some processing after the form has
>>>> loaded - in my case, as my app is quite database intensive, it could
>>>> involve loading sometimes quite large amounts of data.
>>>>
>>>> I'd ideally like to have the form load visually, and then the data
>>>> loading to take place once the form is visible to the user, but if one
>>>> includes this loading in the usual events of _new, show() , then the
>>>> gui-dosn't appear until after the database loading and putting a Wait
>>>> command before the processing starts dosn't seem to help.
>>>>
>>>> Any idea's how to put this sort of activity into the background so the
>>>> gui appears instantly to the user.
>>>>         
>>> I found that a good solution is to use a timer: any short delay is good
>>> (50 ms?). You activate the timer in the show() event and, in the timer
>>> event, you disable it and proceed with the lenghty operations.
>>>
>>> Regards,
>>> Doriano
>>>       





More information about the User mailing list