View Single Post
03/29/15, 05:38 PM   #2
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by lightz39 View Post
Hey everyone, I am currently trying to figure anchors out. I was wondering if its possible to dynamically anchor one item to the next.

I can anchor two things beside each other but the issue is if one changes size (example a clock ranging from 12:00 to 1:00 shrinks) there becomes a larger gap than wanted. Is it possible to always maintain a certain padding no matter what size the string is?
Maybe I missunderstand, but it already does what "I think" your asking. In fact that is the entire point of anchoring controls together.
If one control changes position, size, exc...the controls still stay anchored to each other, at the same point, the gap would not change. The other control just follows it staying attached at the same point.


It sounds more to me like your not resizing the control when the "text" shrinks from 12:00 to 1:00. The control is still exactly the same size, but the text is smaller. So the gap that you see is actually between the text & the other control...its not really between the two controls, that gap would not change (if they were anchored together).

Like in the example picture above, in the bottom picture the words: "Control A" and "Control B" are closer together, the gap between them has shrunk...but the gap (or lack of a gap) between the two controls has not changed at all. They are still connected by their TOPLEFT/BOTTOMRIGHT corners. There is still no gap between the controls, they are still touching.

Last edited by circonian : 03/29/15 at 05:43 PM.
  Reply With Quote