how do you set the width of a dynamically created text or fi

Posted by joey eisma on 22-Jan-2016 13:12

hi!

how do you set the width of a dynamically created text or fill-in object to exactly show its screen-value?

no spaces before or after the object.

thx!

Posted by Matt Gilarde on 22-Jan-2016 13:48

The FONT-TABLE:GET-TEXT-WIDTH-PIXELS() (or GET-TEXT-WIDTH-CHARS) method will calculate how wide a string is in a particular font. You can then set the width of the text or fill-in object to match. You may need to add a bit of padding to fill-ins to leave room for the border.

All Replies

Posted by Matt Gilarde on 22-Jan-2016 13:48

The FONT-TABLE:GET-TEXT-WIDTH-PIXELS() (or GET-TEXT-WIDTH-CHARS) method will calculate how wide a string is in a particular font. You can then set the width of the text or fill-in object to match. You may need to add a bit of padding to fill-ins to leave room for the border.

Posted by joey eisma on 22-Jan-2016 15:15

thank you!

This thread is closed