Is there any way to measure the rectangle for a text string prior to rendering it? I am trying to define a message box control that always keeps the content text centered (mathematically) and I want to make sure that the message box rectangle scales to its content dynamically.
Thanks