Mediv Posted June 9, 2012 Share Posted June 9, 2012 Hi Farhad, need to dynamically create a component, there is a problem with the creation of Label,Edit component. Attached a test project, if the method uses its DynamicForm.CreateTUniLabel label created! If DynamicForm.ConstructionForm (5, 'Metka') there are problems, the result of the screenshot. I apologize in advance for the version I am using Delphi 2007, Build 943, there is no facility to upgrade. I think the problem is not connected with the version uniGui. Maybe the problem is a variable of type TUniControl. Thank you. TestDinamic - ?????.zip Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 11, 2012 Administrators Share Posted June 11, 2012 You can't create a Form dynamically and then refer to its "static" instance. Creating a dynamic form doesn't initialize its reference as we define as: function DynamicForm: TDynamicForm; Calling DynamicForm() inside a dynamically created form will create a 2nd instance. Corrected: Metka : begin pComponent := Self.CreateTUniLabel; pComponent.Tag := 1; end; Link to comment Share on other sites More sharing options...
Mediv Posted June 12, 2012 Author Share Posted June 12, 2012 Thanks, I'll try. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now