mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 03:50:06 +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
|
self.value = None
|
||||||
|
|
||||||
def SetValue(self, value):
|
def SetValue(self, value):
|
||||||
#self.log.write('SetValue: %s' % value)
|
#self.log.write('MyCustomRenderer.SetValue: %s\n' % value)
|
||||||
self.value = value
|
self.value = value
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def GetValue(self):
|
def GetValue(self):
|
||||||
#self.log.write('GetValue')
|
#self.log.write('MyCustomRenderer.GetValue\n')
|
||||||
return self.value
|
return self.value
|
||||||
|
|
||||||
def GetSize(self):
|
def GetSize(self):
|
||||||
@@ -81,7 +81,7 @@ class MyCustomRenderer(dv.DataViewCustomRenderer):
|
|||||||
def GetValueFromEditorCtrl(self, editor):
|
def GetValueFromEditorCtrl(self, editor):
|
||||||
self.log.write('GetValueFromEditorCtrl: %s' % editor)
|
self.log.write('GetValueFromEditorCtrl: %s' % editor)
|
||||||
value = editor.GetValue()
|
value = editor.GetValue()
|
||||||
return value
|
return True, value
|
||||||
|
|
||||||
|
|
||||||
# The LeftClick and Activate methods serve as notifications
|
# The LeftClick and Activate methods serve as notifications
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ class TestModel(dv.DataViewIndexListModel):
|
|||||||
def GetColumnCount(self):
|
def GetColumnCount(self):
|
||||||
return len(self.data[0])
|
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
|
# Report the number of rows in the model
|
||||||
def GetCount(self):
|
def GetCount(self):
|
||||||
#self.log.write('GetCount')
|
#self.log.write('GetCount')
|
||||||
|
|||||||
Reference in New Issue
Block a user