[Gambas-user] setfocus eats way too much time

Doriano Blengino doriano.blengino at ...1909...
Sat Aug 15 12:19:12 CEST 2009


Jean-Yves F. Barbier ha scritto:
> Jean-Yves F. Barbier a écrit :
>   
>> Hi list,
>>
>> I've got a popup that is a small frame containing a TextArea & 2 buttons.
>>
>> In order to do things right, I've got a default text into TextArea; but to
>> make sure typing will fill the TextArea, I must do 2 things: 
>> TextArea1.SelectAll()
>> TextArea1.SetFocus()
>>
>> however, SetFocus() introduce a waiting time up to 1.5 seconds before frame shows!
>>     
>
> This only happen the first time: next invocations don't have this delay
>
>   
May be because the first time the whole window is invisible, and the 
following times is not?
You could also set up a timer (a few milliseconds) and posticipate the 
setfocus.

Regards,

-- 
Doriano Blengino

"Listen twice before you speak.
This is why we have two ears, but only one mouth."





More information about the User mailing list