X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0ccf004304dd6588e8d31ba4d29908477a6bf6ab..260020e39271329f71d1ef7912e3dc8216a2e924:/src/gtk/collpane.cpp diff --git a/src/gtk/collpane.cpp b/src/gtk/collpane.cpp index 229a4759b1..e616adb537 100644 --- a/src/gtk/collpane.cpp +++ b/src/gtk/collpane.cpp @@ -22,14 +22,13 @@ #include "wx/collpane.h" #include "wx/toplevel.h" #include "wx/sizer.h" +#include "wx/panel.h" #include "wx/gtk/private.h" #include "wx/gtk/win_gtk.h" #include -const wxChar wxCollapsiblePaneNameStr[] = wxT("CollapsiblePane"); - // ============================================================================ // implementation // ============================================================================ @@ -94,6 +93,10 @@ static void gtk_collapsiblepane_expanded_callback (GObject *object, if (p->HasFlag(wxCP_NO_TLW_RESIZE)) { + // fire an event + wxCollapsiblePaneEvent ev(p, p->GetId(), p->IsCollapsed()); + p->GetEventHandler()->ProcessEvent(ev); + // the user asked to explicitely handle the resizing itself... return; } @@ -199,8 +202,6 @@ bool wxCollapsiblePane::Create(wxWindow *parent, return wxGenericCollapsiblePane::Create(parent, id, label, pos, size, style, val, name); - m_needParent = true; - m_acceptsFocus = true; m_bIgnoreNextChange = false; if ( !PreCreation( parent, pos, size ) || @@ -224,10 +225,10 @@ bool wxCollapsiblePane::Create(wxWindow *parent, m_insertCallback = gtk_collapsiblepane_insert_callback; // this the real "pane" - m_pPane = new wxWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, - wxNO_BORDER); + m_pPane = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxTAB_TRAVERSAL|wxNO_BORDER); - gtk_widget_show( GTK_WIDGET(m_widget) ); + gtk_widget_show(m_widget); m_parent->DoAddChild( this ); PostCreation(size);