import images
-# This loads a whole bunch of new color names and values
-# into wxTheColourDatabase
-
-colourdb.updateColourDB()
-
#----------------------------------------------------------------------
class TestWindow(wxScrolledWindow):
dc = wxClientDC(self)
dc.SetFont(self.font)
- w,h,d,e = dc.GetFullTextExtent("Wy") # a wide character and one that decends
+ w,h,d,e = dc.GetFullTextExtent("Wy") # a wide character and one that descends
self.textHeight = h + d
self.lineHeight = self.textHeight + 5
self.cellWidth = w
while x < sz.width:
y = -dy
while y < sz.height:
- dc.DrawBitmap(self.bg_bmp, x, y)
+ dc.DrawBitmap(self.bg_bmp, (x, y))
y = y + h
x = x + w
for line in range(max(0,start), min(stop,numColours)):
clr = colours[line]
y = (line+1) * self.lineHeight + 2
- dc.DrawText(clr, self.cellWidth, y)
+ dc.DrawText(clr, (self.cellWidth, y))
brush = wxBrush(clr, wxSOLID)
dc.SetBrush(brush)
- dc.DrawRectangle(12 * self.cellWidth, y, 6 * self.cellWidth, self.textHeight)
+ dc.DrawRectangle((12 * self.cellWidth, y),
+ (6 * self.cellWidth, self.textHeight))
dc.EndDrawing()
def runTest(frame, nb, log):
+ # This loads a whole bunch of new color names and values
+ # into wxTheColourDatabase
+ colourdb.updateColourDB()
+
win = TestPanel(nb)
return win