[Gambas-user] how to write text in indexed list of labels

Christof Thalhofer chrisml at deganius.de
Sun Sep 6 18:21:38 CEST 2020


Am 06.09.20 um 17:58 schrieb pinglix via User:

> I have 200 Label components on a form with name Label1, Label2 ....
> Label200 and I need to change the Text property of one of them through
> an integer index.
> 
> What is the best way to do it ?
> 
> I cannot find a Find() method by name that returns a reference to the
> correct object.
> 
> I can set them to the same Group but then what can I do with it ?

You can search for the program 'findfocus' in the software farm which
iterates through all controls in a form to find the one which has the focus.

The code in it does what you want if you adapt it to your task.

Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20200906/3fc94188/attachment.sig>


More information about the User mailing list