Skip to content

Commit 535b70b

Browse files
authored
Update Simplest.py
1 parent 71176b5 commit 535b70b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

samples/Simplest.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212

1313
Application.Initialize()
1414
Application.Title = "Hello Delphi FMX"
15-
Application.MainForm = Form(Application)
16-
Application.MainForm.SetProps(Caption = "Hello World")
17-
msg = Label(Application.MainForm)
18-
msg.SetProps(Parent = Application.MainForm,
15+
main_window = Form(Application)
16+
Application.MainForm = main_window
17+
18+
main_window.SetProps(Caption = "Hello World")
19+
msg = Label(main_window)
20+
msg.SetProps(Parent = main_window,
1921
Text = "Hello Python from Delphi FMX",
2022
Position = Position(PointF(20, 20)),
2123
Width = 200)
22-
Application.MainForm.Show()
24+
main_window.Show()
2325
Application.Run() # This is the main loop
24-
Application.MainForm.Destroy()
26+
main_window.Destroy()

0 commit comments

Comments
 (0)