good, thank you! Now I am using
for i := 0 to TabSheet2.ControlCount -1 do
if TabSheet2.Controls[i] is Tedit or TabSheet2.Controls[i] is TDBEdit or TabSheet2.Controls[i] is TLabel then begin
TabSheet2.Controls[i].Color := clBlack;
TabSheet2.Controls[i].Font.Color := clSilver;
end;
But maybe should be nicer something as:
const
blackControls = [TEdit,TDBEdit,TLabel];
begin
for i := 0 to TabSheet2.ControlCount -1 do
begin
if TabSheet2.Controls[i] in blackControls do begin
TabSheet2.Controls[i].Color := clBlack;
TabSheet2.Controls[i].Font.Color := clSilver;
end;
end;
btw. this is not working yet (const..Ordinal Expression expected, in..Operator is not overloaded), please, is it possible to use in there and how? I tried some overloading of 'in' but nothing was correct.