Home › Forums › Problems and solutions in GDL › Documentation elements, text handling › FIXING A CUSTOM LABEL WIDTH › Reply To: FIXING A CUSTOM LABEL WIDTH
April 2, 2020 at 01:20
#18674
Bruce Walker
Participant
reqNote = "Your Text Here"
DEFINE STYLE 'txtStyle' LABEL_FONT_NAME, LABEL_TEXT_SIZE, 5, 0
STYLE 'txtStyle'
! Get the Height and Width of the displayed Text, convert it to model size
r = request("Height_of_style", "txtStyle", _heightOfText_mm)
_height = _heightOfText_mm * GLOB_SCALE / 1000
_width = STW(reqNote) / 1000 * GLOB_SCALE