dagon81
20-07-2016, 15:55
Есть событие объединяющие пейджконтрол и мейнменю.
procedure TForm1.PageControl1Change(Sender: TObject);
begin
if PageControl1.ActivePageIndex = 0 then N23.Visible := True else N23.Visible := False;
if PageControl1.ActivePageIndex = 1 then N24.Visible := true else N24.Visible := False;
if PageControl1.ActivePageIndex = 2 then N25.Visible := True else N25.Visible := False;
end;
Подскажите как уменьшить код или упростить его. Не селен в делфи.
procedure TForm1.PageControl1Change(Sender: TObject);
begin
if PageControl1.ActivePageIndex = 0 then N23.Visible := True else N23.Visible := False;
if PageControl1.ActivePageIndex = 1 then N24.Visible := true else N24.Visible := False;
if PageControl1.ActivePageIndex = 2 then N25.Visible := True else N25.Visible := False;
end;
Подскажите как уменьшить код или упростить его. Не селен в делфи.