[Gambas-user] How to Enable/Disable 55 buttons in a few string of code?

Kende Krisztián nemh at ...2007...
Sun Aug 25 10:37:08 CEST 2013


> Hi,
> 
> Something like this:
> 
> For i = 1 To 55 
>      Button & i &.Enable = True
> Next
> 
> Of course, this does not work. 
> So what the way?
> 
> Thanks
> 

For example:

Dim ctrl As Control

For Each ctrl In FMain.Controls

  If InStr(ctrl.Name, "Button") = 1 Then ctrl.Enabled = True

Next




More information about the User mailing list