- Use wxCP_DEFAULT_STYLE
- Share a single wxCollapsiblePaneNameStr for the native and generic
versions
- Use a wxPanel for the pane so tab traversal works in the pane
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43300
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// wxCollapsiblePaneBase: interface for wxCollapsiblePane
// ----------------------------------------------------------------------------
// wxCollapsiblePaneBase: interface for wxCollapsiblePane
// ----------------------------------------------------------------------------
-#define wxCP_DEFAULT_STYLE (wxNO_BORDER)
+#define wxCP_DEFAULT_STYLE (wxTAB_TRAVERSAL | wxNO_BORDER)
#define wxCP_NO_TLW_RESIZE (0x0002)
class WXDLLIMPEXP_CORE wxCollapsiblePaneBase : public wxControl
#define wxCP_NO_TLW_RESIZE (0x0002)
class WXDLLIMPEXP_CORE wxCollapsiblePaneBase : public wxControl
class WXDLLEXPORT wxStaticLine;
// class name
class WXDLLEXPORT wxStaticLine;
// class name
-extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxGenericCollapsiblePaneNameStr[];
+extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxCollapsiblePaneNameStr[];
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+ long style = wxCP_DEFAULT_STYLE,
const wxValidator& val = wxDefaultValidator,
const wxValidator& val = wxDefaultValidator,
- const wxString& name = wxGenericCollapsiblePaneNameStr)
+ const wxString& name = wxCollapsiblePaneNameStr)
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+ long style = wxCP_DEFAULT_STYLE,
const wxValidator& val = wxDefaultValidator,
const wxValidator& val = wxDefaultValidator,
- const wxString& name = wxGenericCollapsiblePaneNameStr);
+ const wxString& name = wxCollapsiblePaneNameStr);
// public wxCollapsiblePane API
// public wxCollapsiblePane API
#include "wx/generic/collpaneg.h"
#include "wx/generic/collpaneg.h"
-extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxCollapsiblePaneNameStr[];
-
// ----------------------------------------------------------------------------
// wxCollapsiblePane
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxCollapsiblePane
// ----------------------------------------------------------------------------
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+ long style = wxCP_DEFAULT_STYLE,
const wxValidator& val = wxDefaultValidator,
const wxString& name = wxCollapsiblePaneNameStr)
{
const wxValidator& val = wxDefaultValidator,
const wxString& name = wxCollapsiblePaneNameStr)
{
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+ long style = wxCP_DEFAULT_STYLE,
const wxValidator& val = wxDefaultValidator,
const wxString& name = wxCollapsiblePaneNameStr);
const wxValidator& val = wxDefaultValidator,
const wxString& name = wxCollapsiblePaneNameStr);
// implementation
// ============================================================================
// implementation
// ============================================================================
-const wxChar wxGenericCollapsiblePaneNameStr[] = wxT("genericCollapsiblePane");
+const wxChar wxCollapsiblePaneNameStr[] = wxT("collapsiblePane");
//-----------------------------------------------------------------------------
// wxGenericCollapsiblePane
//-----------------------------------------------------------------------------
// wxGenericCollapsiblePane
#endif
// do not set sz as our sizers since we handle the pane window without using sizers
#endif
// do not set sz as our sizers since we handle the pane window without using sizers
- m_pPane = new wxWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
- wxNO_BORDER);
+ m_pPane = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
+ wxTAB_TRAVERSAL|wxNO_BORDER);
// start as collapsed:
m_pPane->Hide();
// start as collapsed:
m_pPane->Hide();
#include <gtk/gtkexpander.h>
#include <gtk/gtkexpander.h>
-const wxChar wxCollapsiblePaneNameStr[] = wxT("CollapsiblePane");
-
// ============================================================================
// implementation
// ============================================================================
// ============================================================================
// implementation
// ============================================================================
m_insertCallback = gtk_collapsiblepane_insert_callback;
// this the real "pane"
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) );
m_parent->DoAddChild( this );
gtk_widget_show( GTK_WIDGET(m_widget) );
m_parent->DoAddChild( this );