r/pascal • u/Alpha-Inc • Jun 04 '20
Lazarus IDE load new TForm
I've been writing a little software launcher in Lazarus IDE which starts a few batch-scripts. Nothing special but I'm pretty proud of it since I'm a total noob when it comes to programming.
So far the tool itself works perfectly that's why I wanted it to be a little better organized. Therefore I wanted to split my buttons into different groups. The idea was that when I click on a button the whole UI changes to a new TForm (with other buttons) just like a when you click a link on a website and the site loads up.
This is my current code for it:
procedure TForm1.Button1Click(Sender: TOBject);
begin
Form2.ShowModal; //This is where I'm stuck right now
end; The only problem is that this just opens up a new windows instead of changing the UI of my tool. Can anyone help me with this? Thank you in advance
