Help Panel.height autoadjusting Controls on Panel. lazarus / 39-Graphics ---------------------------------------------------------------------- Josh · 2015-04-26 12:25 Hi I am pretty sure it's something I have set on a control or something, But I have now hit a brick wall trying to work it out. SO I hope someone can shed some light on what settings is causing the Problem. I have a panel that has controls on it, and I am trying to adjust the panel height so that the non-active controls are not displayed. However when I change the Pane.height the controls get all shifted and display incorrectly. Below code trying to work the problem shows a control.top on the panel changing. showmessage('Control Top Before Height Adjusted:'+inttostr(bank_cat_000.Top));   // This display 24 as is the top control on the panel. which is correct Banks_Popup_Panel.Height:=200; // Now adjusting the height of panel to crop the bottom section application.processmessages; showmessage('Control Top After Height Adjusted:'+inttostr(bank_cat_000.Top)); // This now display -10   Why? Unfortunately I cannot upload the whole application, the Panel has components that are created at runtime, I can move the panel around the form and all controls stay intact, but when I change the Panel Height. everything gets messed up. I am hoping that it is a setting with component creation rather than a bug. Hoping someone can help and help. ---------------------------------------------------------------------- Blaazen · 2015-04-26 12:40 Controls on the panel are anchored or aligned? Maybe you changed Panel.ChildSizing. Or simply check all non-default properties in OI (they are red and bold). ---------------------------------------------------------------------- Josh · 2015-04-27 10:20 Hi Blaazen, It was the akLeft,akTop that had been removed. Problem was in my routine that sets all controls Fonts,position  etc before the application is made visible. For some reason I had adjusted these ( must of been for some testing at some point, and forgot to remove). But all is good now Thanks