diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 4c72c6ac75..7f880bb4d9 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -2731,14 +2731,17 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) m_renameTimer->Stop(); m_lastOnSame = FALSE; - if (item->HasPlus()) + 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. Toggle(item); } else { - // 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; diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 46cefd3e0f..2f5bd81523 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -298,6 +298,8 @@ bool wxScrolledWindow::Create(wxWindow *parent, if (m_parent) m_parent->DoAddChild( this ); + + m_focusWidget = m_wxwindow; PostCreation(); diff --git a/src/gtk1/scrolwin.cpp b/src/gtk1/scrolwin.cpp index 46cefd3e0f..2f5bd81523 100644 --- a/src/gtk1/scrolwin.cpp +++ b/src/gtk1/scrolwin.cpp @@ -298,6 +298,8 @@ bool wxScrolledWindow::Create(wxWindow *parent, if (m_parent) m_parent->DoAddChild( this ); + + m_focusWidget = m_wxwindow; PostCreation();