|
| 1 | +object Form1: TForm1 |
| 2 | + Left = 0 |
| 3 | + Top = 0 |
| 4 | + Caption = 'MainForm' |
| 5 | + ClientHeight = 480 |
| 6 | + ClientWidth = 640 |
| 7 | + FormFactor.Width = 320 |
| 8 | + FormFactor.Height = 480 |
| 9 | + FormFactor.Devices = [Desktop] |
| 10 | + DesignerMasterStyle = 0 |
| 11 | + object OpenDialog1: TOpenDialog |
| 12 | + DefaultExt = '*.py' |
| 13 | + Filter = 'Python files|*.py|Text files|*.txt|All files|*.*' |
| 14 | + Left = 200 |
| 15 | + end |
| 16 | + object SaveDialog1: TSaveDialog |
| 17 | + DefaultExt = '*.py' |
| 18 | + Filter = 'Python files|*.py|Text files|*.txt|All files|*.*' |
| 19 | + Left = 232 |
| 20 | + end |
| 21 | + object Memo1: TMemo |
| 22 | + Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] |
| 23 | + DataDetectorTypes = [] |
| 24 | + Align = Top |
| 25 | + Size.Width = 640.000000000000000000 |
| 26 | + Size.Height = 200.000000000000000000 |
| 27 | + Size.PlatformDefault = False |
| 28 | + TabOrder = 8 |
| 29 | + Viewport.Width = 636.000000000000000000 |
| 30 | + Viewport.Height = 196.000000000000000000 |
| 31 | + end |
| 32 | + object Splitter1: TSplitter |
| 33 | + Align = Top |
| 34 | + Cursor = crVSplit |
| 35 | + MinSize = 20.000000000000000000 |
| 36 | + Position.Y = 200.000000000000000000 |
| 37 | + Size.Width = 640.000000000000000000 |
| 38 | + Size.Height = 3.000000000000000000 |
| 39 | + Size.PlatformDefault = False |
| 40 | + end |
| 41 | + object Memo2: TMemo |
| 42 | + Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] |
| 43 | + DataDetectorTypes = [] |
| 44 | + Lines.Strings = ( |
| 45 | + 'from spam import Form' |
| 46 | + '' |
| 47 | + 'class SubForm(Form): ' |
| 48 | + ' def __init__(self, Owner):' |
| 49 | + ' self.Caption = '#39'Subclassed form defined in Python'#39 |
| 50 | + '' |
| 51 | + 'class DelphiSecondForm(Form):' |
| 52 | + ' pass' |
| 53 | + '' |
| 54 | + 'def createbaseform():' |
| 55 | + ' print('#39'Creates a Delphi FMX.TForm'#39')' |
| 56 | + ' form = Form(None)' |
| 57 | + ' try:' |
| 58 | + ' form.Caption = "Delphi FMX base form"' |
| 59 | + ' form.ShowModal()' |
| 60 | + ' finally:' |
| 61 | + ' form.Free();' |
| 62 | + '' |
| 63 | + 'def createpysubform():' |
| 64 | + ' print('#39'Creates a Delphi FMX.TForm subtype defined in Python'#39')' |
| 65 | + ' form = SubForm(None)' |
| 66 | + ' try:' |
| 67 | + ' form.ShowModal()' |
| 68 | + ' finally:' |
| 69 | + ' form.Free()' |
| 70 | + '' |
| 71 | + 'def createdelphisubform():' |
| 72 | + |
| 73 | + ' print('#39'Creates an instance of TDelphiSecondForm registerd form' + |
| 74 | + #39')' |
| 75 | + ' form = DelphiSecondForm(None)' |
| 76 | + ' try:' |
| 77 | + ' print('#39'Label: '#39', form.Label1.Text)' |
| 78 | + ' form.ShowModal()' |
| 79 | + ' finally:' |
| 80 | + ' form.Free()' |
| 81 | + '' |
| 82 | + 'def main():' |
| 83 | + ' createbaseform()' |
| 84 | + ' createpysubform()' |
| 85 | + ' createdelphisubform()' |
| 86 | + '' |
| 87 | + 'if __name__ == '#39'__main__'#39':' |
| 88 | + ' try:' |
| 89 | + ' main()' |
| 90 | + ' except SystemExit:' |
| 91 | + ' pass') |
| 92 | + Align = Client |
| 93 | + Size.Width = 640.000000000000000000 |
| 94 | + Size.Height = 232.000000000000000000 |
| 95 | + Size.PlatformDefault = False |
| 96 | + TabOrder = 10 |
| 97 | + Viewport.Width = 620.000000000000000000 |
| 98 | + Viewport.Height = 228.000000000000000000 |
| 99 | + end |
| 100 | + object Panel1: TPanel |
| 101 | + Align = Bottom |
| 102 | + Position.Y = 435.000000000000000000 |
| 103 | + Size.Width = 640.000000000000000000 |
| 104 | + Size.Height = 45.000000000000000000 |
| 105 | + Size.PlatformDefault = False |
| 106 | + TabOrder = 11 |
| 107 | + object Button1: TButton |
| 108 | + Position.X = 8.000000000000000000 |
| 109 | + Position.Y = 10.000000000000000000 |
| 110 | + Size.Width = 97.000000000000000000 |
| 111 | + Size.Height = 22.000000000000000000 |
| 112 | + Size.PlatformDefault = False |
| 113 | + TabOrder = 2 |
| 114 | + Text = 'Execute script' |
| 115 | + OnClick = Button1Click |
| 116 | + end |
| 117 | + object Button2: TButton |
| 118 | + Position.X = 192.000000000000000000 |
| 119 | + Position.Y = 10.000000000000000000 |
| 120 | + TabOrder = 1 |
| 121 | + Text = 'Load script...' |
| 122 | + OnClick = Button2Click |
| 123 | + end |
| 124 | + object Button3: TButton |
| 125 | + Position.X = 280.000000000000000000 |
| 126 | + Position.Y = 10.000000000000000000 |
| 127 | + TabOrder = 0 |
| 128 | + Text = 'Save script...' |
| 129 | + OnClick = Button3Click |
| 130 | + end |
| 131 | + end |
| 132 | + object PythonEngine1: TPythonEngine |
| 133 | + IO = PythonGUIInputOutput1 |
| 134 | + Left = 8 |
| 135 | + end |
| 136 | + object PythonModule1: TPythonModule |
| 137 | + Engine = PythonEngine1 |
| 138 | + ModuleName = 'spam' |
| 139 | + Errors = <> |
| 140 | + Left = 40 |
| 141 | + end |
| 142 | + object PythonGUIInputOutput1: TPythonGUIInputOutput |
| 143 | + UnicodeIO = True |
| 144 | + RawOutput = False |
| 145 | + Output = Memo1 |
| 146 | + Left = 104 |
| 147 | + end |
| 148 | + object PyDelphiWrapper1: TPyDelphiWrapper |
| 149 | + Engine = PythonEngine1 |
| 150 | + Module = PythonModule1 |
| 151 | + Left = 72 |
| 152 | + end |
| 153 | +end |
0 commit comments