wxScrolledWindow inherits from wxPanel to

make tab travseral work.
  Work around for GTK scrolledwidget bug.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-05-26 09:03:25 +00:00
parent 2917e92043
commit 053f9cc122
7 changed files with 628 additions and 587 deletions
+2 -1
View File
@@ -17,10 +17,11 @@
#endif
#include "wx/window.h"
#include "wx/panel.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
class WXDLLEXPORT wxScrolledWindow: public wxWindow
class WXDLLEXPORT wxScrolledWindow: public wxPanel
{
DECLARE_ABSTRACT_CLASS(wxScrolledWindow)
+18 -1
View File
@@ -19,6 +19,7 @@
#endif
#include "wx/image.h"
#include "wx/listctrl.h"
// derived classes
@@ -97,8 +98,24 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
(void) new wxComboBox( this, -1, "This", wxPoint(10,130), wxDefaultSize, 5, choices );
(void) new wxRadioBox( this, -1, "This", wxPoint(10,200), wxDefaultSize, 5, choices );
wxListCtrl *m_listCtrl = new wxListCtrl(
this, -1, wxPoint(200, 10), wxSize(180, 120),
wxLC_REPORT | wxSUNKEN_BORDER);
m_listCtrl->InsertColumn(0, "First", wxLIST_FORMAT_LEFT, 90);
m_listCtrl->InsertColumn(1, "Last", wxLIST_FORMAT_LEFT, 90);
for ( int i=0; i < 30; i++)
{
char buf[20];
sprintf(buf, "Item %d", i);
m_listCtrl->InsertItem(i, buf);
}
(void) new wxListBox( this, -1, wxPoint(200,180), wxSize(180,120), 5, choices, wxLB_ALWAYS_SB );
SetBackgroundColour( *wxWHITE );
SetBackgroundColour( "WHEAT" );
}
MyCanvas::~MyCanvas()
+4 -3
View File
@@ -25,15 +25,16 @@
#endif
#include "wx/generic/scrolwin.h"
#include "wx/panel.h"
#if !USE_SHARED_LIBRARY
BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow)
BEGIN_EVENT_TABLE(wxScrolledWindow, wxPanel)
EVT_SCROLLWIN(wxScrolledWindow::OnScroll)
EVT_SIZE(wxScrolledWindow::OnSize)
EVT_PAINT(wxScrolledWindow::OnPaint)
END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow)
IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxPanel)
#endif
#ifdef __WXMSW__
@@ -80,7 +81,7 @@ bool wxScrolledWindow::Create(wxWindow *parent, wxWindowID id,
m_scaleX = 1.0;
m_scaleY = 1.0;
return wxWindow::Create(parent, id, pos, size, style, name);
return wxPanel::Create(parent, id, pos, size, style, name);
}
/*
+301 -290
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -635,7 +635,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
}
}
// win is a control: tab can be propagated up
/* win is a control: tab can be propagated up */
if ( (!ret) &&
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
(win->HasFlag(wxTE_PROCESS_TAB) == 0))
+301 -290
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -635,7 +635,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
}
}
// win is a control: tab can be propagated up
/* win is a control: tab can be propagated up */
if ( (!ret) &&
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
(win->HasFlag(wxTE_PROCESS_TAB) == 0))