Something like (FYI: This code does not work, but hopefully it will give you an idea of what I'm attempting to accomplish):
- Code: Select all
procedure TframeEditContact.SetChildrenZIndex(Container: TIWCGJQContainer; Value: Integer = 100);
var
i: Integer;
begin
for i := 0 to Container.ComponentCount - 1 do
begin
if (Container.Components[i].ComponentCount > 0) then
Self.SetChildrenZIndex((Container.Components[i] AS TIWCGJQContainer), Value)
else
try
(Container.Components[i] AS TIWCGJQGenericControlWithZIndexProperty).Zindex := Value + 1;
except
end;
end;
end;
If possible, I would like to avoid testing each type to determine if it has a .Zindex property.
Suggestions?
TIA!
Scott