git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41574
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wx.ScrolledWindow.__init__(self, parent, -1)
# Populate our color list
wx.ScrolledWindow.__init__(self, parent, -1)
# Populate our color list
- self.clrList = wx.lib.colourdb.getColourList()
+ self.clrList = wx.lib.colourdb.getColourInfoList()
# Just for style points, we'll use this as a background image.
# Just for style points, we'll use this as a background image.
self.bg_bmp = images.getGridBGBitmap()
# This could also be done by getting the window's default font;
self.bg_bmp = images.getGridBGBitmap()
# This could also be done by getting the window's default font;
def Draw(self, dc, rgn=None, vs=None):
def Draw(self, dc, rgn=None, vs=None):
dc.SetTextForeground("BLACK")
dc.SetPen(wx.Pen("BLACK", 1, wx.SOLID))
dc.SetFont(self.font)
dc.SetTextForeground("BLACK")
dc.SetPen(wx.Pen("BLACK", 1, wx.SOLID))
dc.SetFont(self.font)
stop = numColours
for line in range(max(0,start), min(stop,numColours)):
stop = numColours
for line in range(max(0,start), min(stop,numColours)):
y = (line+1) * self.lineHeight + 2
dc.DrawText(clr, self.cellWidth, y)
brush = wx.Brush(clr, wx.SOLID)
dc.SetBrush(brush)
y = (line+1) * self.lineHeight + 2
dc.DrawText(clr, self.cellWidth, y)
brush = wx.Brush(clr, wx.SOLID)
dc.SetBrush(brush)
- dc.DrawRectangle(12 * self.cellWidth, y,
+ dc.DrawRectangle(10 * self.cellWidth, y,
6 * self.cellWidth, self.textHeight)
6 * self.cellWidth, self.textHeight)
+
+ dc.DrawText(str(tuple(colours[line][1:])),
+ 18 * self.cellWidth, y)
# On wxGTK there needs to be a panel under wx.ScrolledWindows if they are
# On wxGTK there needs to be a panel under wx.ScrolledWindows if they are