comp • gb.gui.base • paint • trimtext

Paint.TrimText (gb.qt4)

Static Function TrimText ( Text As String, W As Float [ , H As Float ] ) As String

Return a trimmed version of the specified 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.

  • Text is the 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.