[Gambas-user] Hope I'm doing this correctly - I'm searching for help to reference a control using a variable

Charlie Ogier charlie at cogier.com
Thu Mar 22 15:17:23 CET 2018


Hi David,

Have a look at the example code attached.

Charlie

On 22/03/18 04:07, David Eaton via User wrote:
> I'm new to this mailing list idea - I don't know how they work or if 
> I'm posting into the correct one.
>
> I am looking for some help in programming with Gambas.  In particular, 
> I have a program that has several label controls. I need to be able to 
> set properties on these labels via a variable - similar to this pseudo 
> code:
>
> dim stringx as string = ""
> dim myint as integer = 1
>
> myint = somenumber_determined_at_runtime
> stringx = "Label" & myint
> Stringx.propertiy = somevalue_determined_at_runtime
>
> I was able to do this in Visual Basic following some samples on the 
> internet.
>
> Is there a way to do this in Gambas?
>
> Thank you, and if I have put this in the completely wrong place please 
> let me know.
>
>
> --------------------------------------------------
>
> This is the Gambas Mailing List:
> https://lists.gambas-basic.org/listinfo/user
>
> Search the list:
> https://lists.gambas-basic.org/cgi-bin/search.cgi
>
> Hosted by https://www.hostsharing.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180322/a35d6040/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GUITest.tar.gz
Type: application/gzip
Size: 293937 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180322/a35d6040/attachment-0001.gz>


More information about the User mailing list