def DrawSelf(self, dc, bounds):
        """
        Do the actual work of rendering this block.
        """
        cellFmt = self.GetFormat()
        cellPadding = cellFmt.CalculateCellPadding()
        combined = self.GetCombinedLists()

        # Calculate cell boundaries
        cell = list(bounds)
        RectUtils.SetWidth(cell, 0)
        for x in combined:
            RectUtils.SetLeft(cell, RectUtils.Right(cell))
            RectUtils.SetWidth(cell, x.cellWidth)
            x.cell = list(cell)

        # Draw each cell
        font = self.GetFont()
        for x in combined:
            cellBounds = RectUtils.InsetRect(x.cell, cellPadding)
            self.DrawText(dc, x.text, cellBounds, font, x.align, imageIndex=x.image,
                          canWrap=cellFmt.CanWrap, listCtrl=self.GetListCtrl())

        if cellFmt.GridPen and combined:
            dc.SetPen(cellFmt.GridPen)
            dc.SetBrush(wx.TRANSPARENT_BRUSH)

            top = RectUtils.Top(bounds)
            bottom = RectUtils.Bottom(bounds)

            # Draw the interior dividers
            for x in combined[:-1]:
                right = RectUtils.Right(x.cell)
                dc.DrawLine(right, top, right, bottom)

            # Draw the surrounding frame
            left = RectUtils.Left(combined[0].cell)
            right = RectUtils.Right(combined[-1].cell)
            dc.DrawRectangle(left, top, right-left, bottom-top)


#----------------------------------------------------------------------------
dataset/ETHPy150Open ODM2/ODMToolsPython/odmtools/lib/ObjectListView/ListCtrlPrinter.py/CellBlock.DrawSelf/original