4

I have a delphi form with specific ClientHeight and ClientWidth and 2 panels on it with certain width and height. When I resize the form, I want the panels to be resized automatically on runtime. How can I do this? Is there any built-in feature present in delphi to resize the child controls when parent controls are resized or I have to program it?

Triber
  • 1,525
  • 2
  • 21
  • 38

1 Answers1

6

Use the panel's Align and/or Anchors properties. They are designed for exactly this purpose.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • Can you please elaborate how to use Align and Anchor in this case? –  Nov 26 '12 at 08:45
  • I added links to the documentation. – Remy Lebeau Nov 26 '12 at 16:35
  • Oh Sorry, I did not see the links and read as simple text. Yes Anchors property is doing my work. Thank you very much. I am accepting your answer. –  Nov 27 '12 at 05:50
  • 1
    Also, please answer my this question: http://stackoverflow.com/questions/13559156/unexpected-behaviour-of-ttable-and-tdbgrid-in-delphi-xe2 –  Nov 27 '12 at 06:03
  • Sorry, I don't have much experience with TDBGrid. My DB experience is mostly non-visual work. – Remy Lebeau Nov 27 '12 at 08:02
  • Its okay. But I needed it to be solved urgently. Nobody has answered or commented it yet. Can you refer somebody for this? –  Nov 27 '12 at 08:08