wx.dataview.DataViewListCtrl not responding to enter key

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

wx.dataview.DataViewListCtrl not responding to enter key

Chris Norman
Hi all,
I hit up the great god Google with this one, and no luck:

I want to be able to press enter on rows in my wx.dataview.DataViewListCtrl, and have the currently selected row activated, exactly as a double click currently gets you. Is there a style or something for this? Or and event I can Bind?

Python 2.7.9 (default, May  7 2015, 14:42:41) 
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.49)] on darwin
WX 3.0.2.0 osx-cocoa (classic)

Thanks in advance.

Take care,
Chris Norman



--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wx.dataview.DataViewListCtrl not responding to enter key

Christian K


El miércoles, 13 de mayo de 2015, 5:36:04 (UTC-3), Chris Norman escribió:
Hi all,
I hit up the great god Google with this one, and no luck:

I want to be able to press enter on rows in my wx.dataview.DataViewListCtrl, and have the currently selected row activated, exactly as a double click currently gets you. Is there a style or something for this? Or and event I can Bind?

Do you mean, that activating works with double click but not when pressing enter? It just checked and it does on windows. You have to bind to  EVT_DATAVIEW_ITEM_ACTIVATED.

Christian

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wx.dataview.DataViewListCtrl not responding to enter key

Chris Norman
Hi,

On 13 May 2015, at 21:12, Christian K <[hidden email]> wrote:

El miércoles, 13 de mayo de 2015, 5:36:04 (UTC-3), Chris Norman escribió:
Hi all,
I hit up the great god Google with this one, and no luck:

I want to be able to press enter on rows in my wx.dataview.DataViewListCtrl, and have the currently selected row activated, exactly as a double click currently gets you. Is there a style or something for this? Or and event I can Bind?

Do you mean, that activating works with double click but not when pressing enter? It just checked and it does on windows. You have to bind to  EVT_DATAVIEW_ITEM_ACTIVATED.

I have this code:
self.results.Bind(dv.EVT_DATAVIEW_ITEM_ACTIVATED, self.select_item)

I worked around it by making a menu item with an enter key bound to it which basically does the same thing. It works so far, but it’s not desirable I don’t think.

Christian

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.