* * *

Author Topic: Suggestion about desinger guide line spacer  (Read 979 times)

wp

  • Hero Member
  • *****
  • Posts: 4906
Re: Suggestion about desinger guide line spacer
« Reply #15 on: September 12, 2018, 10:32:47 am »
It is less fluent to use, and in complex forms it is terrible to understand the dependencies between aligned controls because it is no longer possible to drag controls with the mouse, but the easiest way to solve alignment requirements is to use the Anchor Editor. I was scared of it for a long time, but once I understood its principle, I use it almost all the time. It is to easiest way to create cross-platform and multi-language applications.

E.g: http://wiki.freepascal.org/Anchor_Sides
« Last Edit: September 12, 2018, 10:34:18 am by wp »
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3489
  • I like bugs.
Re: Suggestion about desinger guide line spacer
« Reply #16 on: September 12, 2018, 11:48:37 am »
To align TLabel to center to the TEdit in Lazarus I need to type the Top property manually
What do you mean? You don't need to type anything when anchoring and aligning controls.

tr_escape

  • Sr. Member
  • ****
  • Posts: 340
  • sector name toys | respect to spectre
    • Github:
Re: Suggestion about desinger guide line spacer
« Reply #17 on: September 12, 2018, 12:45:45 pm »
Anchor side is good but also I would prefer another feature that resize by percentage:

Normally we can do it by code ofcourse but I would prefer by form design:

Code: Pascal  [Select]
  1.  
  2. procedure TfrmMain.FormResize(Sender: TObject);
  3. begin
  4.   // pnl_Top.Height:=Round(frmMain.Height * 0.08);
  5.   pnl_Bottom.Height:=Round(frmMain.Height * 0.20);
  6.  
  7.   pnl_Left1.Width:=Round(frmMain.Width * 0.10);
  8.   pnl_Left2.Width:=Round(frmMain.Width * 0.10);
  9.   pnl_Right1.Width:=Round(frmMain.Width * 0.10);
  10.   pnl_Right2.Width:=Round(frmMain.Width * 0.10);
  11.  
  12.   Button1.Width:=round(pnl_Top.Width * 0.10);
  13.   Button2.Width:=round(pnl_Top.Width * 0.10);
  14.   Button3.Width:=round(pnl_Top.Width * 0.10);
  15.   Button4.Width:=round(pnl_Top.Width * 0.10);
  16.   Button5.Width:=round(pnl_Top.Width * 0.10);
  17.  
  18.   Button6.Width:=round(pnl_Top.Width * 0.10);
  19. end;
  20.  

But ofcourse there is no full scaleable form design. (maybe firemonkey is exception)

andresayang

  • Jr. Member
  • **
  • Posts: 54
Re: Suggestion about desinger guide line spacer
« Reply #18 on: September 16, 2018, 09:02:00 pm »
Hi all,

Isn't exactly what I already ask for here: http://forum.lazarus-ide.org/index.php/topic,39735.0.html

Cheers
Linux, Debian 9
Lazarus: always latest release

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus