backport Roman's changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-02-08 20:30:27 +00:00
parent e728b32239
commit 3c901e1e03
10 changed files with 581 additions and 110 deletions

View File

@@ -555,7 +555,7 @@ class ContentCheckListDialog(wx.Dialog):
pre = wx.PreDialog()
g.frame.res.LoadOnDialog(pre, parent, 'DIALOG_CONTENT_CHECKLIST')
self.PostCreate(pre)
self.list = xrc.XRCCTRL(self, 'CHECKLIST')
self.list = xrc.XRCCTRL(self, 'CHECK_LIST')
# Set list items
i = 0
for v,ch in value:
@@ -674,6 +674,17 @@ class ParamContentCheckList(ParamContent):
self.SetModified()
self.textModified = False
dlg.Destroy()
def SetValue(self, value):
self.freeze = True
if not value: value = []
self.value = value
if value:
if len(value) == 1: repr_ = str(value)
else: repr_ = reduce(lambda a,b: '%s|%s' % (a,b), value)
else:
repr_ = ''
self.text.SetValue(repr_) # update text ctrl
self.freeze = False
class IntListDialog(wx.Dialog):
def __init__(self, parent, value):