news |
info |
people |
software |
stuff |
TextUtils XFCN. Version 1.0, by Sam Deane. Copyright ©1994 ULTRALAB. Compiled 15:42:52, 12/12/94.
You can also use it to find out how deep (in pixels) some text is in a field. This allows you to work out, on the fly, whether a field needs to be scrolling or not to fit a given bit of text into it.
The syntax is:
get TextUtils(width,<string>,<font>)
The <string> parameter should contain the text to be measured.
The <font> parameter should contain the font, size, and style of text in the format:
<font>,<size>,<style>
on mouseUp Ask "Text?" if it is not empty then put it into text put "Helvetica" into font put "10" into size put "bold" into style put font & comma & size & comma & style into fontStuff get TextUtils(width,text,fontStuff) put text & " was " & it & " pixels in Bold Helvetica 10." end if end mouseUp
The syntax is:
get TextUtils(fieldHeight,<name>,<background>)
The <name> parameter is the name of a field. The <background> parameter is a boolean, true if the field is on the background, false otherwise.
on closeField get TextUtils(fieldHeight,"Test",TRUE) set the height of me to it+8 end closeField