Returns a truncated string with ellipsis, and sets an AN with a tooltip containing the complete string if a truncation occurs.
Syntax
StrTruncFontTooltip(INT nANForTooltip, STRING sText, STRING sFont, INT nPixels)
nANForTooltip
The AN for which the tooltip needs to be set.
sText
The text to truncate.
sFont
The name of the font that is used to display the text. The font name needs to be defined in the Fonts database. If the font is not found, the default font is used.
nPixels
Number of pixels that the text can display before truncation occurs.
Return Value
Returns the truncated string.
Example
StrTruncFontTooltip(10, “My really, really, really long string”, "SA_ButtonFont", 50)
Related Functions
Published June 2018