I'm running Delphi 7 on WinXP Pro SP3. I have a series of 20 edit boxes Edit1 to Edit20. Based on a definable criteria, how do I change the properties of only certain TEdit fields?
For example, for "Criteria 1", I want TEdit fields 3, 4, 5 & 12 Color property set to clMediumGray. Edit fields 1, 2, 6-11, 13-20 remain unchanged.
Code below loops through TEdit fields, but I don't know how to further identify a specific TEdit(x) where x is 1, 2,..., 20.
Is this possible? If so how do I do it?
with Form1 do
for I := 0 to Form1.ComponentCount - 1 do
if Form1.Components[I] is TEdit then
with Form1.Components[I] as TEdit do
<< I want to execute this code for only certain TEdit(x) fields. How do I code selection criteria to identify only specific Edit(x) fields and do the assignment?
Color := clMediumGray;
Enabled := False;