Mediv Posted June 9, 2012 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 Quote
Administrators Farshad Mohajeri Posted June 11, 2012 Administrators 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; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.