* * *

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

wp

  • Hero Member
  • *****
  • Posts: 5053
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: 3526
  • 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: 342
  • 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: 56
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

Yukiko

  • New member
  • *
  • Posts: 24
Re: Suggestion about desinger guide line spacer
« Reply #19 on: October 08, 2018, 02:03:23 am »
I appreciate and use the guide lines in the Designer but there have been a few times when I can see having "custom" guide lines might be useful.

I used to do desktop publishing and the program we had, Page Maker, had horizontal and vertical guide lines that could be dragged in from the edges of the page to aid in alignment. Dragging from the edge of a form is probably not possible but perhaps there would be a way a user could overlay and position their own guides on a form. The way positioning the guides worked in Page Maker was you would place the mouse cursor on the guide line and the cursor would change to arrows pointing either left and right or up and down depending on the orientation of the guide and you would click-drag the line where you wanted it.

Just a thought.

 

Recent

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