On 26/04/2006, at 7:27 PM, carlosper...@alumnos.uvigo.es wrote:

> I have this code:
>         #self==panel
>
>         vs=wx.BoxSizer(wx.VERTICAL)
>
>         self.partListCtrlMarks = wx.ListCtrl(self.panel, -1, style =
> wx.LC_REPORT)
>         vs.Add(self.partListCtrlMarks, 1, wx.EXPAND | wx.ALL, 4)
>
>         self.partListCtrlMarks.InsertColumn(0, "Name")
>         self.partListCtrlMarks.InsertColumn(1, "Note")
>         self.partListCtrlMarks.SetColumnWidth(1, 80)
>
> I would like to bind the ListCtrl when a item is selected. But I don't
> know which event i have to set in Bind function or if it is possibel.
>
>          self.Bind(WHICH_EVENT,FunctionName,self.partListCtrlMarks)

Have look at:
        http://mail.python.org/pipermail/python-list/2005-November/310329.html
and the "Next Message" link at the bottom of that page. They describe  
almost the same problem and a solution.

Briefly, a EVT_LIST_ITEM_SELECTED and callback function are bound to  
the ListCtrl object. When an item is selected, the callback function  
must first determine which item was selected (see "Next Message"  
link) and then perform some action with the information obtained from  
the selected item.



Christoph Willing                       +61 7 3365 8350
QPSF Access Grid Manager
University of Queensland



Reply via email to