From: Liam C. <cy...@gm...> - 2005-03-16 01:59:21
|
Hi Brad, for a multicolumnlist called MCL, because I'm boring - def on_MCL_itemActivated(self, event): wasSelected = self.components.MCL.getStringSelection()[0] will return the list(line) that was clicked on. To get an actual index for it, use - def on_MCL_itemActivated(self, event): selectedIndex = event.m_itemIndex I trawled through the wxPython multicolumnlist demo code to find that. Remember, 90% of the wxPython tricks you need are in the demo, it's just the knack of finding them. Only reason I found that is I noticed that when you click an item in that demo it prints stuff like this - OnItemSelected: 5, Billy Joel, Blonde Over Blue, Rock So yeah... good luck, Pythoncard is great, and very flexible, and it's not that often you have to revert to the wx stuff. HTH Liam Clarke -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. |