def create_data_view_ctrl(self):
dvc = dv.DataViewCtrl(self.splitter, style=dv.DV_ROW_LINES|
dv.DV_VERT_RULES|dv.DV_MULTIPLE
)
UIM = UIManager()
controller = UIM.get(self._controller_uid)
model = controller._get_real_model()
# Track
dv_col = dvc.AppendTextColumn("Track", 0, width=85)
dv_col.SetMinWidth(55)
# Object Type
dvcr_object_tid = ObjectTidRenderer()
dv_col = dv.DataViewColumn("Object Type", dvcr_object_tid, 1, width=85)
dv_col.SetMinWidth(85)
dvc.AppendColumn(dv_col)
# Object Name
dvcr_curve_name = ObjectNameRenderer(model)
dv_col = dv.DataViewColumn("Object Name", dvcr_curve_name, 2, width=130)
dv_col.SetMinWidth(85)
dvc.AppendColumn(dv_col)
# Adjusting
for idx, dv_col in enumerate(dvc.Columns):
dv_col.Renderer.Alignment = wx.ALIGN_CENTER
dv_col.SetAlignment(wx.ALIGN_CENTER)
return dvc
评论列表
文章目录