def Draw(self, grid, dc, rect, row): dc.SetBrush(wx.Brush(self._bgcolor)) dc.SetPen(wx.TRANSPARENT_PEN) dc.DrawRectangle(rect) hAlign, vAlign = grid.GetRowLabelAlignment() text = grid.GetRowLabelValue(row) self.DrawBorder(grid, dc, rect) self.DrawText(grid, dc, rect, text, hAlign, vAlign)
def Draw(self, grid, dc, rect, row): #dc.SetBrush(wx.Brush(self._bgcolor)) dc.SetBrush(wx.TRANSPARENT_BRUSH) dc.SetPen(wx.Pen('blue', 5, wx.SHORT_DASH)) #dc.SetPen(wx.TRANSPARENT_PEN) dc.DrawRectangleRect(rect) hAlign, vAlign = grid.GetRowLabelAlignment() text = grid.GetRowLabelValue(row) self.DrawBorder(grid, dc, rect) self.DrawText(grid, dc, rect, text, hAlign, vAlign)
def Draw(self, grid, dc, rect, row): rect.y -= 1 if row == grid.actions.cursor[0]: color = get_color(config["selection_color"]) else: color = get_color(config["label_color"]) dc.SetPen(wx.TRANSPARENT_PEN) dc.SetBrush(wx.Brush(color)) dc.DrawRectangleRect(rect) hAlign, vAlign = grid.GetRowLabelAlignment() text = grid.GetRowLabelValue(row) if row != grid.actions.cursor[0]: self.DrawBorder(grid, dc, rect) self.DrawText(grid, dc, rect, text, hAlign, vAlign)
def Draw(self, grid, dc, rect, row): if row == grid.actions.cursor[0]: rect.y += 1 rect.height -= 1 pen_color = get_color(wx.SYS_COLOUR_MENUHILIGHT) pen = wx.Pen(pen_color, 2, wx.SOLID) dc.SetPen(pen) else: dc.SetPen(wx.TRANSPARENT_PEN) color = get_color(wx.SYS_COLOUR_BACKGROUND) dc.SetBrush(wx.Brush(color)) dc.DrawRectangleRect(rect) hAlign, vAlign = grid.GetRowLabelAlignment() text = grid.GetRowLabelValue(row) self.DrawBorder(grid, dc, rect) self.DrawText(grid, dc, rect, text, hAlign, vAlign)
def Draw(self, grid, dc, rect, row): graphicUtils.DrawLineGradient(dc, rect.GetX(), rect.GetY(), rect.GetX() + rect.GetWidth() - 2, rect.GetY() + rect.GetHeight() - 1, self._start_color, self._end_color) r = wx.Rect(rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight()) if self._drawNumRow: hAlign, vAlign = grid.GetRowLabelAlignment() text = grid.GetRowLabelValue(row) dc.SetPen(wx.TRANSPARENT_PEN) self.DrawText(grid, dc, rect, text, hAlign, vAlign) # Top Line dc.SetPen(self._top_pen) dc.DrawLine(r.GetX(), r.GetY(), r.GetX() + r.GetWidth(), r.GetY()) dc.DrawLine(r.GetX(), r.GetY() + 1, r.GetX() + r.GetWidth(), r.GetY() + 1) # Right Line dc.SetPen(self._right_pen) dc.DrawLine(r.GetX() + r.GetWidth() - 1, r.GetY(), r.GetX() + r.GetWidth() - 1, r.GetY() + r.GetHeight()) # Left Line dc.SetPen(self._left_pen) dc.DrawLine(r.GetX(), r.GetY(), r.GetX(), r.GetY() + r.GetHeight()) # Bottom dc.SetPen(self._bot_pen) dc.DrawLine(r.GetX(), r.GetY() + r.GetHeight() - 1, r.GetX() + r.GetWidth(), r.GetY() + r.GetHeight() - 1) if self.IsDrawCursor() and grid.GetGridCursorRow() == row: st = 0 sty = r.GetY() penBound = wx.Pen(SORT_BORDER_CLR) dc.SetPen(penBound) brush = wx.Brush(SORT_P_CLR, wx.SOLID) dc.SetBrush(brush) dc.DrawPolygon(CursorMarkDark, mark_shith_x + st, mark_shith_y + sty)