10-16-2018 06:29 AM
I was wondering if anyone has come up with a good method to check if a control's value doesn't fit in the control's on-screen space (when displayed).
For example, I may have a string control that is sized such that it will just about fit 6 characters at 36pt. Most of the possible values to display will be 6 characters or shorter, but a few may be longer - causing the text to either wrap onto a new line (and not be visible) or run out of the edge of the control (and be illegible). As I have no room to make the control bigger, I need to change the font size whenever this occurs.
Lazy me knows I can just check if the string is longer than 6 characters, and set the font size smaller if it is. It'd be better to find a more generic solution (as this situation can occur with any number of characters being the limit). Also, as most fonts have varying widths of character, it'd be better if there were a way to directly check if the string's value overruns or causes wrapping.
I can't seem to find any properties that could help me, so I'd appreciate any suggestions!
Solved! Go to Solution.
10-16-2018 06:45 AM
10-16-2018 08:20 AM
I had no idea that vi existed, thanks!