limelect 48 Posted September 13, 2020 (edited) A new problem on fmx. My test is always TLabel. On VCL If the container is Tlabel then the program creates The label on top of a label. Position 0,0. which is OK. If the first label is in the middle of the form the second label will be on top of the first in the middle of the form. Nothing special to say about VCL. ON fmx putting a label on top of another label is a mess. The second label position is thrown at -500 or greater on both axes. Which it does create but put it at a place outside of the 0,0 container. If I RESELECT the form or pannel before creating the component , IT IS OK. I hope I am understood. Edited September 13, 2020 by limelect Share this post Link to post
David Hoyle 68 Posted September 13, 2020 I don't have any experience with FMX but I suspect we need to understand whether the currently selected control can take other child controls. Unfortunately I don't have the time today to have a look at this but I will look into this. 1 Share this post Link to post
limelect 48 Posted September 13, 2020 (edited) @David Hoyle I am working with BPL so I do not need to RESTART Delphi after instalation as in DLL. I took a different path for creating so, can you put here your test program so I can try it. May be your path does not do that fmx problem. Thanks P.S I have in my software if not lComponent.IsTControl then begin ShowMessage('The Component of Selected is not Container Control!'); exit; end; Edited September 13, 2020 by limelect Share this post Link to post
David Hoyle 68 Posted September 13, 2020 Her e's my code from last night. Add Comp To Form.zip Share this post Link to post
limelect 48 Posted September 14, 2020 @David Hoyle Thanks. As I said you are the EXPERT. I will modify for fmx too. Hopffuly I will succeed . Share this post Link to post
limelect 48 Posted September 14, 2020 @David Hoyle I modified your software for FMX too and it works as it should be. Thanks again. P.S BPL is easier to work with you do not need to close Delphi and restart or have a second Delphi open. . Share this post Link to post
David Hoyle 68 Posted September 14, 2020 @limelect Yes, BPLs can see to be easier to work with but bear in mind that if you code something wrong you can make the IDE you are working in unstable. I always use a secondary IDE using a -rNewRegKey command line and then I can kill of that session if I do something wrong. Share this post Link to post