I have a Problem in Python and i dont know how to solve it the best way. I have createt a List (wxListCtrl) with several dynamic createtd Checkboxes and Choices fields. Now I would like to set the corosponding Checkbox if the user selcets someting from the choice list. But i have no idea how i should know wich choice list is changed? Could I do something with the ID of the choice list?
self.list = ULC.UltimateListCtrl(self.panel, wx.ID_ANY, size=(800, 350), pos=(600, 20),
agwStyle=wx.LC_REPORT | wx.LC_VRULES | wx.LC_HRULES | wx.LC_SINGLE_SEL |
ULC.ULC_HAS_VARIABLE_ROW_HEIGHT)
self.list.InsertColumn(0, "Stream", width=150)
self.list.InsertColumn(1, "convert", width=50)
self.list.InsertColumn(2, "Sink", width=400)
# create checkboxes
self.cb = wx.CheckBox(self.list, -1, "")
self.cb_list.append(self.cb)
self.list.SetItemWindow(index, 1, self.cb, expand=True)
# create choiceboxes
self.choice = wx.Choice(self.list, -1, choices=list_of_sinks)
self.list.SetItemWindow(index, 2, self.choice, expand=True)
self.choice_list.append(self.choice)
self.Bind(wx.EVT_CHOICE, self.onChoise, self.choice)
def onChoise(self, e):
selcet_the_chekbox_somehow()
Aucun commentaire:
Enregistrer un commentaire