sakya
asked on
control array
Hello.
I want to use control array like Visual Basic.
Can I program component as array?
Please teach me how to program and a example.
I want to use control array like Visual Basic.
Can I program component as array?
Please teach me how to program and a example.
ASKER
Yes,but I know this way.
I want more cool code because my application has hundreds of components,
Help.
I want more cool code because my application has hundreds of components,
Help.
Any component has property Components and ComponentCount.
Components lists of all components owned by the component.
Any wincontrol has property Controls and ControlCount.
The Controls property is an array of all controls that are children of the windowed control.
Try to use it.
Components lists of all components owned by the component.
Any wincontrol has property Controls and ControlCount.
The Controls property is an array of all controls that are children of the windowed control.
Try to use it.
you could also use a TList to contain your components...
ASKER
Thanks vladika.
Thanks ZifNab.
I will try.
Thanks ZifNab.
I will try.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
viktornet. Thanks for your good examples.
in the private part of the form put : MyControlArray=Array[0..2]
in the OnCreate event of the form put :
MyControlArray[0]:=Edit1;
MyControlArray[1]:=Edit2;
MyControlArray[2]:=Edit3;
Then you can use them whereever you want by either using Edit1, Edit2, Edit3 or MyControlArray[i].