wxPython how to get row ID of list item that is double clicked
<p>I am working on a wxPython app in which I have used a wx.ListCtrl with 12 columns. The control gets populated with some values upon clicking a button... let's say Name, Age, Class, House... etc.</p>

<p>Now I want to create a double click event which upon double cliking a list item should pop-up a msgbox with the Name value, however I am unable to get the row number or ID of the row item that is being double clicked...</p>

<p>here is my Code:-</p>

<pre><code>self.subList.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.DblClickOptions)

def DblClickOptions(self, extra):
    itm = self.subList.GetItem(itemId='???', col=1)
    itm_text = itm.GetText()
    ctypes.windll.user32.MessageBoxA(0, itm_text, "title", 1)
</code></pre>

<p>in the code above I need to get the row number of the list item that is double clicked in place of '???'</p>

<p>Please someone help me with this.</p>

<p>Regards,
Premanshu</p>

<p><a href="http://xoomer.virgilio.it/infinity77/wxPython/Events/wx.ListEvent.html#methods-summary" rel="nofollow">http://xoomer.virgilio.it/infinity77/wxPython/Events/wx.ListEvent.html#methods-summary</a></p>

<p>(typically the variable you named <code>extra</code> is named <code>event</code> or <code>evt</code> ...)</p>

<p><code>extra.GetIndex()</code> would be the row id</p>

<p><code>extra.GetText()</code> would be the row text</p>

<p>etc</p>

python wxpython listctrl