Lots of demo tweaks for API updates, bug fixes and new images for the

wxListbook demo


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-11-21 07:36:53 +00:00
parent 5c0ccabf02
commit fbd5dd1dfa
31 changed files with 638 additions and 116 deletions

View File

@@ -199,7 +199,7 @@ class MegaImageRenderer(wxPyGridCellRenderer):
else:
dc.SetBrush(wxBrush(wxWHITE, wxSOLID))
dc.SetPen(wxPen(wxWHITE, 1, wxSOLID))
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height)
dc.DrawRectangleRect(rect)
# copy the image but only to the size of the grid cell
width, height = bmp.GetWidth(), bmp.GetHeight()
@@ -209,9 +209,9 @@ class MegaImageRenderer(wxPyGridCellRenderer):
if height > rect.height-2:
height = rect.height-2
dc.Blit(rect.x+1, rect.y+1, width, height,
dc.Blit((rect.x+1, rect.y+1), (width, height),
image,
0, 0, wxCOPY, True)
(0, 0), wxCOPY, True)
class MegaFontRenderer(wxPyGridCellRenderer):
@@ -243,7 +243,7 @@ class MegaFontRenderer(wxPyGridCellRenderer):
else:
dc.SetBrush(wxBrush(wxWHITE, wxSOLID))
dc.SetPen(wxPen(wxWHITE, 1, wxSOLID))
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height)
dc.DrawRectangleRect(rect)
text = self.table.GetValue(row, col)
dc.SetBackgroundMode(wxSOLID)
@@ -259,7 +259,7 @@ class MegaFontRenderer(wxPyGridCellRenderer):
dc.SetTextForeground(self.color)
dc.SetFont(self.font)
dc.DrawText(text, rect.x+1, rect.y+1)
dc.DrawText(text, (rect.x+1, rect.y+1))
# Okay, now for the advanced class :)
# Let's add three dots "..."
@@ -270,8 +270,8 @@ class MegaFontRenderer(wxPyGridCellRenderer):
if width > rect.width-2:
width, height = dc.GetTextExtent("...")
x = rect.x+1 + rect.width-2 - width
dc.DrawRectangle(x, rect.y+1, width+1, height)
dc.DrawText("...", x, rect.y+1)
dc.DrawRectangle((x, rect.y+1), (width+1, height))
dc.DrawText("...", (x, rect.y+1))
dc.DestroyClippingRegion()