comp • gb.gui.base • paint • trimrichtext

Paint.TrimRichText (gb.qt4)

Static Function TrimRichText ( RichText As String, W As Float [ , H As Float ] ) As String

Return a trimmed version of the specified rich text so that it fits the requested rectangle.

If the text fits the requested rectangle, it is returned as is. Otherwise it is trimmed and followed by an ellipsis character so that it fits.

  • RichText is the rich text to trim.

  • W is the width of the rectangle.

  • H is the height of the rectangle. If omitted, then it is assumed to be the font height. In other words, the text is supposed to fit a single line.