Recent

Author Topic: Help Panel.height autoadjusting Controls on Panel.  (Read 1996 times)

Josh

  • Hero Member
  • *****
  • Posts: 1274
Help Panel.height autoadjusting Controls on Panel.
« on: April 26, 2015, 02:25:27 pm »
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.
« Last Edit: April 26, 2015, 02:28:14 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Help Panel.height autoadjusting Controls on Panel.
« Reply #1 on: April 26, 2015, 02:40:32 pm »
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).
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Josh

  • Hero Member
  • *****
  • Posts: 1274
Re: Help Panel.height autoadjusting Controls on Panel.
« Reply #2 on: April 27, 2015, 12:20:17 pm »
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
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

 

TinyPortal © 2005-2018