Recent

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

tr_escape

  • Sr. Member
  • ****
  • Posts: 403
  • sector name toys | respect to spectre
    • Github:
Suggestion about desinger guide line spacer
« on: September 11, 2018, 12:52:11 pm »
Hello,

Is there any work around about Delphi component spacer like as in the attached figure?

Ofcourse sometimes this method can be not effective but it helps for tidy design.

Best regards

Lazarus 1.9.0 r58688 FPC 3.1.1 i386-win32-win32/win64

ASerge

  • Hero Member
  • *****
  • Posts: 1412
Re: Suggestion about desinger guide line spacer
« Reply #1 on: September 11, 2018, 04:38:50 pm »
Is there any work around about Delphi component spacer like as in the attached figure?
And is it necessary? As seen in the picture text for Memo and Button at different heights.

tr_escape

  • Sr. Member
  • ****
  • Posts: 403
  • sector name toys | respect to spectre
    • Github:
Re: Suggestion about desinger guide line spacer
« Reply #2 on: September 11, 2018, 04:50:14 pm »
But designer holds automaticly when you try to move button component to the memo.

If you still move the button to memo component designer breaks your movement.

IMHO it will be helps for form design timing.
« Last Edit: September 11, 2018, 05:05:28 pm by tr_escape »

ASerge

  • Hero Member
  • *****
  • Posts: 1412
Re: Suggestion about desinger guide line spacer
« Reply #3 on: September 11, 2018, 05:05:45 pm »
But designer holds automaticly when you try to move button component to the memo.
How is that better than the aligning by borders?

wp

  • Hero Member
  • *****
  • Posts: 6359
Re: Suggestion about desinger guide line spacer
« Reply #4 on: September 11, 2018, 05:18:26 pm »
The only time when I am missing this feature is when horizontally aligning a label to an edit: The IDE easily alignes the edit to the top or bottom of the edit which means that the text of the edit and the caption of the label are at different heights.  But now I am working a lot with the Anchor Editor where I can vertically center the label with respect to the edit, and this looks fine.

A problem with the alignment line appears to me that they seem to be correct only for the current font. But when a cross-platform application runs under another widget set usually there are different fonts which have different ascenders and descenders making the form look bad. I have not seen this when the label is centered to the edit with the Anchor Editor.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

tr_escape

  • Sr. Member
  • ****
  • Posts: 403
  • sector name toys | respect to spectre
    • Github:
Re: Suggestion about desinger guide line spacer
« Reply #5 on: September 11, 2018, 06:25:38 pm »
I think there is a misunderstanding that I think I couldn't share picture what I meaning.

If you look zoom that figure there is some space about 4 pixel between both component.

Designer holding my movement when I try to move near by memo.
Other way user have align by first component.


I will explain with an gif or small video what I mean.

lucamar

  • Hero Member
  • *****
  • Posts: 2084
Re: Suggestion about desinger guide line spacer
« Reply #6 on: September 11, 2018, 07:21:17 pm »
I'm not sure I'm following you, either, but just in case this is what you want ...

When you align components you must be aware that the intrinsic border of the control plays a role too. In your case, the (widgetset dependent) border of the memo is a simple line, while the border of the button is a bit more complex (and fatter). What this means is that, aligned on top, the caption of the button will naturally be a little lower than the first line of the memo.

There is little you can do about this, since it's all system-dependent, i.e. it depends on the operating sytem, the widget-set, the desktop manager, the desktop theme, ... most of which is outside and independent of your program.

Regarding this:
Designer holding my movement when I try to move near by memo.
Other way user have align by first component.

May it be that you have "snap to grid" selected for control-positioning? Or maybe the button and/or memo have some BorderSpacing set?
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

tr_escape

  • Sr. Member
  • ****
  • Posts: 403
  • sector name toys | respect to spectre
    • Github:
Re: Suggestion about desinger guide line spacer
« Reply #7 on: September 11, 2018, 07:41:47 pm »
So,

It is OK I created a gif file that in that site:

https://gph.is/2QoW4bk

Yes snap to grid is also good but I am not using long time.

You will see some guide lines when you move components on the form.

Also I added some new figure you will see details of the snap lines


« Last Edit: September 11, 2018, 07:48:23 pm by tr_escape »

ASerge

  • Hero Member
  • *****
  • Posts: 1412
Re: Suggestion about desinger guide line spacer
« Reply #8 on: September 11, 2018, 09:55:07 pm »
It is OK I created a gif file that in that site:
The only difference with Lazarus is the extra inner lines in the center. Is that all?

HeavyUser

  • Sr. Member
  • ****
  • Posts: 262
Re: Suggestion about desinger guide line spacer
« Reply #9 on: September 11, 2018, 10:00:41 pm »
It is OK I created a gif file that in that site:
The only difference with Lazarus is the extra inner lines in the center. Is that all?
yes that makes a big difference on the speed of design of forms and standardizes the placement of controls to a huge extended.

tr_escape

  • Sr. Member
  • ****
  • Posts: 403
  • sector name toys | respect to spectre
    • Github:
Re: Suggestion about desinger guide line spacer
« Reply #10 on: September 11, 2018, 10:26:49 pm »
It is OK I created a gif file that in that site:
The only difference with Lazarus is the extra inner lines in the center. Is that all?

Ofcourse it may as an option because of general usage habit of actual users.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3646
  • I like bugs.
Re: Suggestion about desinger guide line spacer
« Reply #11 on: September 12, 2018, 12:28:46 am »
It is OK I created a gif file that in that site:
https://gph.is/2QoW4bk
The video or the pictures show nothing about the text aligning snap lines that you had in the first post. Is it intentional?

The arguments against such text aligning lines are valid. The results would not be consistent between different widgetsets and fonts.

tr_escape

  • Sr. Member
  • ****
  • Posts: 403
  • sector name toys | respect to spectre
    • Github:
Re: Suggestion about desinger guide line spacer
« Reply #12 on: September 12, 2018, 07:02:39 am »
It is OK I created a gif file that in that site:
https://gph.is/2QoW4bk
The video or the pictures show nothing about the text aligning snap lines that you had in the first post. Is it intentional?

The arguments against such text aligning lines are valid. The results would not be consistent between different widgetsets and fonts.

Actually I never talked about text alignment but the pink line of the first figure is drove the lazarus team to different way. Sorry about that. :)
But also I would prefer if you able to align by the text too :)



JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3646
  • I like bugs.
Re: Suggestion about desinger guide line spacer
« Reply #13 on: September 12, 2018, 07:34:28 am »
Actually I never talked about text alignment but the pink line of the first figure is drove the lazarus team to different way. Sorry about that. :)
But also I would prefer if you able to align by the text too :)
To my understanding the pink line in Delphi aligns text in those controls. In Lazarus designer the lines only align edges of controls.

Dio Affriza

  • Jr. Member
  • **
  • Posts: 87
Re: Suggestion about desinger guide line spacer
« Reply #14 on: September 12, 2018, 09:51:04 am »
I think that's a not bad idea!  :)
To align TLabel to center to the TEdit in Lazarus I need to type the Top property manually, but that's okay. That's not a something annoys me  :-[

I don't think it will be broken in another widget set, mostly anchor guided it when the font size changed, isn't it?

Edit: sorry. When I think again, it will not work in a different widget set, because of the space between font and border may different. Hmmm... There's no alternative for this idea for now I think.

(Sorry for my broken English  :-\ )
« Last Edit: September 12, 2018, 10:06:39 am by dioaffriza »