I am wishing for the capability of arrays of controls I know about the control keyword etc but thats a lot of book keeping for me.
Is it possible with net?
Returns an array with the names of all the controls that belong to the specified control.
Syntax: GetControls (Control Name)
Pass an empty string "", to get all the controls available.
added 6 Textboxes, 6 CheckBoxes and 6 Buttons in the designer, to form1...
Then I added this code:
B4X:
Sub Globals
'Declare the global variables here.
Dim b(1)
End Sub
Sub App_Start
Form1.Show
B()=GetControls("")
For i =0 To ArrayLen(B())-1
Control(B(i)).Text="New Txt"
Next
End Sub
And ALL controls got their text prop chnged to the value I mentioned...
In what way is this diferent from what you think he is aiming for, Klaus?
GetControls("") get an aray of ALL the controls contained in a Module, with their module prefixe... includng the forms...
But the way I understoud bdiscount's wish is that he could define an array of let's say 6 TextBoxes, another array of 5 RadioButtons and so on, but he doesn't want to have all the form's controls in one array.
I had used Control arrays in Visual Basic.
Anyway, for me, as Erel said, the Control keyword allowing the same is satisfactory. I just wanted to clarify the subject.
Klaus is right about what I want. At my age it is a lot easier to keep track of a direct array with out using control. But thats a problem with age and memory going, too old to dev. for sale but ok for personal work. thanks for all the trials
PS I got the idea from VB etc. I used to dev in C++,VB, Masm