from wxScrolledWindow.
If wxTreeCtrl has no +/. button, toggle branch,
otherwise send activate event upon double-click.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11432
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
m_renameTimer->Stop();
m_lastOnSame = FALSE;
m_renameTimer->Stop();
m_lastOnSame = FALSE;
+ if (item->HasPlus() && !HasButtons())
- // for a "directory" node, toggle expansion
+ // If the control has no buttons,the only way
+ // to expand/collapse it is by double clicking
+ // an item. In this case we cannot send any
+ // activate event.
- // for a "file" node, activate it
+ // If we have buttons, just send activate event.
wxTreeEvent nevent( wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
GetId() );
nevent.m_item = (long) item;
wxTreeEvent nevent( wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
GetId() );
nevent.m_item = (long) item;
if (m_parent)
m_parent->DoAddChild( this );
if (m_parent)
m_parent->DoAddChild( this );
+
+ m_focusWidget = m_wxwindow;
if (m_parent)
m_parent->DoAddChild( this );
if (m_parent)
m_parent->DoAddChild( this );
+
+ m_focusWidget = m_wxwindow;