[Gambas-user] New TextArea

Benoît Minisini g4mba5 at gmail.com
Mon Mar 8 10:18:51 CET 2021


Le 08/03/2021 à 03:29, Jussi Lahtinen a écrit :
> 1. See attachment.
> 2. Make a new text alarm, which has few words. Set it to go off after a 
> few seconds.
> 3. Observe the alarm form as it appears.
> 
> Example, if I have written to the alarm; "This is a test alarm!", it 
> shows it wrapped like this:
> 
> This
> is
> a
> test
> alarm!
> 
> 
> Jussi
> 

It's normal. Your code is buggy: you suppose that the controls are 
arranged before the Open event is raised. They usually are not.

You must run any code that depends on the size of an arranged control 
from the Arrange event handler of the control parent.

Moreover, I don't understand at all what you are trying to do. If you 
want to display wrapped text inside a TextArea, just set the Wrap 
property to TRUE. No need to do it by yourself.

Regards,

-- 
Benoît Minisini


More information about the User mailing list