Some scripts are posted to compute width based on font and font size, so that might be one way. Another way could be to use ControlGetPos to measure (determine) the width before and after adding the text. You would then know whether the text needs to be shortened.