Delphi Panel遍历解释
procedure TFrmMain.SetPnlvisible(Pnl: TPanel; IsShow: Boolean);
var
i: Integer;
begin
for i := 0 to left.ControlCount - 1 do
if left.Controls[i] is TPanel then
if (left.Controls[i].Name <> Pnl.Name) and (left.Controls[i].Name <> 'Panel1') then
left.Controls[i].Visible := not IsShow;
Pnl.Visible := IsShow;
有点看不懂这个遍历,谁来讲讲,简单详细点。