little demo tweaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-11-19 18:55:39 +00:00
parent 67167e345d
commit dd8838213d
2 changed files with 4 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin):
self.SetCellBackgroundColour(2, 2, wxCYAN) self.SetCellBackgroundColour(2, 2, wxCYAN)
self.SetReadOnly(3, 3, true) self.SetReadOnly(3, 3, true)
self.SetCellEditor(5, 0, wxGridCellNumberEditor()) self.SetCellEditor(5, 0, wxGridCellNumberEditor(1,1000))
self.SetCellValue(5, 0, "123") self.SetCellValue(5, 0, "123")
self.SetCellEditor(6, 0, wxGridCellFloatEditor()) self.SetCellEditor(6, 0, wxGridCellFloatEditor())
self.SetCellValue(6, 0, "123.34") self.SetCellValue(6, 0, "123.34")

View File

@@ -191,7 +191,9 @@ class TestListCtrlPanel(wxPanel, wxColumnSorterMixin):
self.x = event.GetX() self.x = event.GetX()
self.y = event.GetY() self.y = event.GetY()
self.log.WriteText("x, y = %s\n" % str((self.x, self.y))) self.log.WriteText("x, y = %s\n" % str((self.x, self.y)))
print event.GetEventObject() item, flags = self.list.HitTest((self.x, self.y))
if flags & wxLIST_HITTEST_ONITEM:
self.list.Select(item)
event.Skip() event.Skip()