ID:133808
 
It would be nice if, instead of specifying only percentages for anchors, we could specify exact pixel amounts. As an example, say I want the map anchored 5px from the top-left and 5px from the bottom-right to give a 5px padding at all sizes. Percents muff that up as the size expands and shrinks.

Hiead
Hiead wrote:
It would be nice if, instead of specifying only percentages for anchors, we could specify exact pixel amounts. As an example, say I want the map anchored 5px from the top-left and 5px from the bottom-right to give a 5px padding at all sizes. Percents muff that up as the size expands and shrinks.

You're not thinking of anchors the right way, then. If you want a constant 5px border, then you want to anchor to exactly the upper left and bottom right, and just start your control with a 5px distance from those edges.

Essentially anchors do have an exact pixel distance--from the corner of your control to the anchor point. This probably deserves a Dream Makers article to explain it better for people.

Lummox JR
In response to Lummox JR
The anchors are like on the corners of the control, not on the corners of the window.
In response to Kaiochao2536
Kaiochao2536 wrote:
The anchors are like on the corners of the control, not on the corners of the window.

No, the anchors are at a specific place on the window, as specified by percentages. The corners of the control will always keep a constant distance to those anchors.

Lummox JR