TreeListCtrl doesn't process ENTER key - WinXP

Is there a way to capture the ENTER key in the
TreeListCtrl? I’ve tried binding to EVT_CHAR and EVT_KEY_DOWN with no
luck. I want the TreeListCtrl to behave like the standard TreeCtrl – pressing
ENTER when a node is selected “activates” the item (same as
double-clicking the item).

Thanks.

···

Jason Harper

Qualcomm, Portland
Design Center

Hi Andrea,
That's strange.... :frowning: You are referring to the
wx.gizmos.TreeListCtrl....right? The wx.ListCtrl is working fine for
me. I am also using wxPython 2.8.3 on Windows XP. The only difference
being that I am still on Python 2.3. Did you see this working in the
demo program?

Thanks,
Jason

···

-----Original Message-----
From: Andrea Gavana [mailto:andrea.gavana@gmail.com]
Sent: Wednesday, April 04, 2007 8:59 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] TreeListCtrl doesn't process ENTER key -
WinXP

Hi guys,

On 4/4/07, Mike Rooney wrote:

Harper, Jason wrote:
> Thanks Mike. Unfortunately, the wx.EVT_TREE_ITEM_ACTIVATED is not
> received when the ENTER key is pressed only when an item is
> double-clicked. Any other ideas?
>
> I'm pretty sure that the above method used to work prior to wx 2.8

on

> Windows.
>
>

You are right, I can duplicate this (non) behavior in the demo on
WinXP/2.8.1.1 as well. It just works for double clicks. I wonder if

this

is a bug?

It works here, wxPython 2.8.3, Python 2.5, Windows XP. Hitting enter
generates the correct OnItemActivated event (if there is an item
selected, obviously).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org