diegojmap Posted October 21, 2016 Share Posted October 21, 2016 I have a routine in vcl I use a lot and I'm testing in unigui,when I try to pass a button of a form to another using "parent" does not work and this error message.I can for an entire form for UniContainerPanel another control does not.It has a form or another is a bug or do not like to do? for I := 0 to Form.ComponentCount - 1 do begin if ((Form.Components is TUniSpeedButton)) then begin TUniSpeedButton(Form.Components).Parent := PnlSuperior; end end TuniSpeedButton.SetParante(): Parent.OwnerForm must be same as Self.OwnerForm(H:\Framework\uniGUI\Source\Core\uniGuiClasse.pas, line 4705) 1 Link to comment Share on other sites More sharing options...
diegojmap Posted February 14, 2017 Author Share Posted February 14, 2017 This form is a set of forms, each tab is a form.Through the parent command in vcl I reaproveite forms and controls in a UniContainerPanel.In unigui I can pass the form by parent, but not a control.I've attached the example.Was it a bug? Could not you also use parent in controls? TesteParent.rar Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 14, 2017 Administrators Share Posted February 14, 2017 A component's owner and its parent's owner must be the same. You should not normally need to violate this rule. uniGUI tries to mimic VCL as much as possible, but it is not VCL and there are some restrictions. Link to comment Share on other sites More sharing options...
diegojmap Posted February 16, 2017 Author Share Posted February 16, 2017 I thought maybe I had another way.For example, create a control that you can use in more than one place using parent. 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