I have this code:
program testGUI; uses System, Controls, GraphWPF; begin Window.Title := 'GUI Mode with WPF'; var edit1 := TextBoxWPF.Create(40,30,'Type your name:',100); var button1 := ButtonWPF.Create(40,80,'Click me!',100,12); edit1.FontSize := 13; button1.Height := 30; // I thought it would be like this, but this does not work obviously button1.Click := () -> begin // show another window var form1 := Form.Create; var button2 := ButtonWPF.Create(40,80,'Click me!',100,12); form1.AppendControl(button2); // or draw using GraphABC form1.Pen.Color := clNavy; form1.DrawCircle(100,100,40); form1.Show; end; end.
Now, if I click on button1, I want to create and show another window (form) that has its own controls or draw upon itu using GraphABC methods. The new form definition could be in the same program file or in another file (unit).
Anybody have a hint how to do it? Is it possible?