I wrote a program in Lazarus 3.2 with a few panels,all in the same unit. I want to display one at a time,so I want to hide the others with a procedure. I got error messages: identifier not found "panel 3" identifier not found "panel 6" below is the code:
procedure HidePanels;
begin
panel2.hide;
panel3.hide;
panel6.hide;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
HidePanels;
panel2.left:=120;
panel2.top:=8;
panel2.show;
end;
Thanks in advance for your help.
if I put the code line from the HidePnels proceddure in each procedure that needs to hide other panels, the code works, but that's more code than I should have.
Made one change in HidePanels procdeure and it works:
change panel2.hide; to Form1.panel2.hide;
since it's part of form1
should work with other resources, too.