mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
fixes for the dataview samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,12 +13,12 @@ class MyCustomRenderer(dv.DataViewCustomRenderer):
|
||||
self.value = None
|
||||
|
||||
def SetValue(self, value):
|
||||
#self.log.write('SetValue: %s' % value)
|
||||
#self.log.write('MyCustomRenderer.SetValue: %s\n' % value)
|
||||
self.value = value
|
||||
return True
|
||||
|
||||
def GetValue(self):
|
||||
#self.log.write('GetValue')
|
||||
#self.log.write('MyCustomRenderer.GetValue\n')
|
||||
return self.value
|
||||
|
||||
def GetSize(self):
|
||||
@@ -81,7 +81,7 @@ class MyCustomRenderer(dv.DataViewCustomRenderer):
|
||||
def GetValueFromEditorCtrl(self, editor):
|
||||
self.log.write('GetValueFromEditorCtrl: %s' % editor)
|
||||
value = editor.GetValue()
|
||||
return value
|
||||
return True, value
|
||||
|
||||
|
||||
# The LeftClick and Activate methods serve as notifications
|
||||
|
||||
@@ -38,6 +38,10 @@ class TestModel(dv.DataViewIndexListModel):
|
||||
def GetColumnCount(self):
|
||||
return len(self.data[0])
|
||||
|
||||
# Specify the data type for a column
|
||||
def GetColumnType(self, col):
|
||||
return "string"
|
||||
|
||||
# Report the number of rows in the model
|
||||
def GetCount(self):
|
||||
#self.log.write('GetCount')
|
||||
|
||||
Reference in New Issue
Block a user