36 lstcolwidths = [ 100, 50, 100, 100, 100, 50] |
36 lstcolwidths = [ 100, 50, 100, 100, 100, 50] |
37 lstcoltypess = [ str, int, str, str, str, int] |
37 lstcoltypess = [ str, int, str, str, str, int] |
38 |
38 |
39 directions = ["input", "output"] |
39 directions = ["input", "output"] |
40 |
40 |
41 class OPCUASubListModel(dv.DataViewIndexListModel): |
41 class OPCUASubListModel(dv.PyDataViewIndexListModel): |
42 def __init__(self, data, log): |
42 def __init__(self, data, log): |
43 dv.DataViewIndexListModel.__init__(self, len(data)) |
43 dv.PyDataViewIndexListModel.__init__(self, len(data)) |
44 self.data = data |
44 self.data = data |
45 self.log = log |
45 self.log = log |
46 |
46 |
47 def GetColumnType(self, col): |
47 def GetColumnType(self, col): |
48 return "string" |
48 return "string" |
308 self.tree_panel = wx.Panel(self) |
308 self.tree_panel = wx.Panel(self) |
309 self.tree_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=0) |
309 self.tree_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=0) |
310 self.tree_sizer.AddGrowableCol(0) |
310 self.tree_sizer.AddGrowableCol(0) |
311 self.tree_sizer.AddGrowableRow(0) |
311 self.tree_sizer.AddGrowableRow(0) |
312 |
312 |
313 self.tree = gizmos.TreeListCtrl(self.tree_panel, -1, style=0, agwStyle= |
313 self.tree = TreeListCtrl(self.tree_panel, -1, style=0, agwStyle= |
314 gizmos.TR_DEFAULT_STYLE |
314 wx.TR_DEFAULT_STYLE |
315 | gizmos.TR_MULTIPLE |
315 | wx.TR_MULTIPLE |
316 | gizmos.TR_FULL_ROW_HIGHLIGHT |
316 | wx.TR_FULL_ROW_HIGHLIGHT |
317 ) |
317 ) |
318 |
318 |
319 prepare_image_list() |
319 prepare_image_list() |
320 self.tree.SetImageList(il) |
320 self.tree.SetImageList(il) |
321 |
321 |