Appending Text According to TextField Container Size
I have had a recent request to check the length of text in a TextField, and if it exceeds a certain size i.e. the width of its container, then to find the characters that precedes the container boundary and replace them with “…”
Here is the method I ended up using to achieve this:
1 2 3 4 5 6 7 |
|