Recent

Author Topic: Alignment facilities  (Read 5167 times)

ezlage

  • Guest
Alignment facilities
« on: October 16, 2012, 01:50:36 pm »
Fields like "Top", "Left", "Width" and "Height" should accept simple calculations for alignment purpose (in design-time).

(Example)
Top: 5+50+10
(where number 5 is the space between an object and the form's border, 50 is the Height of a upper object, and 10 the default space between objects)

If possible to use properties of another object, much better! (This way, objects will automatically repositioned if I resize another object)
This way: Top: borderspace+Object1.Height+spacebtwobjs

Regards.

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: Alignment facilities
« Reply #1 on: October 16, 2012, 02:15:23 pm »
You have Anchors property too. It won't act based on other objects in same framespace, but it does with containers and form itself. You can put your "aligned" objects in a panel and then just move the panel (hide panel borders if need to). Or simply select all and move together.

Other thing is, that if you have more than 10 objects with same alignment, you should consider creating them manually at runtime, or use some sort of grid object.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8798
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Alignment facilities
« Reply #2 on: October 17, 2012, 06:08:19 pm »
this should be what you're looking for:
http://wiki.freepascal.org/Autosize_/_Layout

ezlage

  • Guest
Re: Alignment facilities
« Reply #3 on: October 20, 2012, 04:05:48 pm »
User137 and Leledumbo,  thank you!

The anchors will be helpful!

Regards.

 

TinyPortal © 2005-2018