I make a program (electronic manual) and I need the buttons to stay in their place, and the working window stretch, depending on the screen size. How can I do that?

  • 2
    Use the form property Align . - nick_n_a
  • 2
    Find the book "basics delphi." In the first chapters, this is all described. - nick_n_a
  • 2
    Use property of buttons and other elements Anchors - Kromster
  • When using Align, the button is stretched to the full width and with Anchors it still remains in place and when the screen expansion changes, it remains where the screen was smaller - OwlGG

1 answer 1

Suppose you have this layout:

  _________________ [кнопка1] | | [кнопка2] | | | панСль1 | | | | | |_________________| [ кнопка3 ] [кнопка4] [кнопка5] 

Register here such anchors for elements ( Anchors )

 ΠΊΠ½ΠΎΠΏΠΊΠ°1 = ΠΊΠ½ΠΎΠΏΠΊΠ°2 = [akLeft, akTop] // прилСпится ΠΊ Π²Π΅Ρ€Ρ…Π½Π΅ΠΌΡƒ Π»Π΅Π²ΠΎΠΌΡƒ ΡƒΠ³Π»Ρƒ панСль1 = [akLeft, akTop, akBottom, akRight] // Π±ΡƒΠ΄Π΅Ρ‚ Ρ€Π°ΡΡ‚ΡΠ³ΠΈΠ²Π°Ρ‚ΡŒΡΡ ΠΊΠ½ΠΎΠΏΠΊΠ°3 = ΠΊΠ½ΠΎΠΏΠΊΠ°4 = ΠΊΠ½ΠΎΠΏΠΊΠ°5 = [akBottom, akRight] // прилСпится ΠΊ Π½ΠΈΠΆΠ½Π΅ΠΌΡƒ ΠΏΡ€Π°Π²ΠΎΠΌΡƒ ΡƒΠ³Π»Ρƒ 

I hope the principle is clear?