Thanks for the suggestion, initially it didn't work how I needed it to, so I took a look at the code and changed it to:
protected override void OnAnchor ()
{
if (mOverflow == Overflow.ResizeFreely)
{
mOverflow = Overflow.ShrinkContent;
}
else if (mOverflow == Overflow.ResizeHeight)
{
if (topAnchor.target != null)
{
mOverflow = Overflow.ShrinkContent;
}
}
base.OnAnchor();
}
Which allowed me to set a bottom anchor and not have one for the top, although ideally it should work both ways (in the original code resize height only works if there are no anchors on the top
and bottom, whereas it should be top
or bottom - but I have no idea how to do that in code)
The more I think about it, the more it seems odd that anchored labels must be always be forced to shrink content - there are many situations I can think of where being able to override the overflow would be useful, especially if you just want to anchor something with dynamic content to a certain side of the screen and not have to worry about screen resolution, etc.