eivindbakkestuen 47 Posted August 25 I'm playing around with Demo31, its very neat that we can do things like this in the .py script: mytestform = CreateComponent("TForm", None) mytestform.Caption = 'Hello Delphi-PRAXIS' mytestform.Height = 1000 mytestform.ShowModal() However, it would be even cooler if it was possible to use the Pascal style of creation: mytestform = TForm.Create() Unfortunately, playing around with the DelphilWrapper classes hasn't lead to anything working; I've tried things like these PyDelphiWrapper.RegisterDelphiWrapper(TPyClassWrapper<TForm>).Initialize; ...or... PyDelphiWrapper.WrapClass(TForm); Is there any way of registering Delphi classes, such that the someclass.Create() syntax would work in a .py script? Share this post Link to post
pyscripter 694 Posted August 25 (edited) You can create instances of classes in the "pythonic" way: myform = Form() TForm.Create() is not supported (TForm is exposed in python as Form). Edited August 25 by pyscripter Share this post Link to post