@staticmethod
    def DrawTruncatedString(dc, text, bounds, align=wx.ALIGN_LEFT, valign=wx.ALIGN_TOP, ellipse=wx.RIGHT, ellipseChars="..."):
        if not text:
            return

        if align == wx.ALIGN_CENTER:
            align = wx.ALIGN_CENTER_HORIZONTAL

        if valign == wx.ALIGN_CENTER:
            valign = wx.ALIGN_CENTER_VERTICAL

        try:
            bounds = wx.Rect(*bounds)
        except:
            pass
        lines = WordWrapRenderer._Truncate(dc, text, bounds[2], ellipse, ellipseChars)
        dc.DrawLabel(lines, bounds, align|valign)
Draw the given text truncated to the given bounds.
dataset/ETHPy150Open ODM2/ODMToolsPython/odmtools/lib/ObjectListView/WordWrapRenderer.py/WordWrapRenderer.DrawTruncatedString