procedure FillComObjToInspector(ContainComp: TWinControl);
var
i: Integer;
begin
for i := 0 to ContainComp.ControlCount - 1 do
begin
cbInspector.Items.AddObject(ContainComp.Controls.Hint, ContainComp.Controls);
TControl(ContainComp.Controls).ShowHint := True;
//判断是否是容器控件
if (csAcceptsControls in ContainComp.Controls.ControlStyle) then
AddLargeTwoLevelComObj(TWinControl(ContainComp.Controls));
end;
if cbInspector.Items.Count > 0 then
cbInspector.ItemIndex := 0;
end;
procedure AddLargeTwoLevelComObj(ContainerCom: TWinControl);
var
i: Integer;
begin
for i := 0 to ContainerCom.ControlCount - 1 do
begin
cbInspector.Items.AddObject(ContainerCom.Controls.Hint, ContainerCom.Controls);
TControl(ContainerCom.Controls).ShowHint := True;
if (csAcceptsControls in ContainerCom.Controls.ControlStyle) then
AddLargeTwoLevelComObj(TWinControl(ContainerCom.Controls));
end;
end;
//测试通过