allow user code to override key handling in wxTreeCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2183,7 +2183,11 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event )
|
|||||||
wxTreeEvent te( wxEVT_COMMAND_TREE_KEY_DOWN, GetId() );
|
wxTreeEvent te( wxEVT_COMMAND_TREE_KEY_DOWN, GetId() );
|
||||||
te.m_code = (int)event.KeyCode();
|
te.m_code = (int)event.KeyCode();
|
||||||
te.SetEventObject( this );
|
te.SetEventObject( this );
|
||||||
GetEventHandler()->ProcessEvent( te );
|
if ( GetEventHandler()->ProcessEvent( te ) )
|
||||||
|
{
|
||||||
|
// intercepted by the user code
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( (m_current == 0) || (m_key_current == 0) )
|
if ( (m_current == 0) || (m_key_current == 0) )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user