diff --git a/src/mycanvas.h b/src/mycanvas.h index b31389dd..70261955 100755 --- a/src/mycanvas.h +++ b/src/mycanvas.h @@ -1,4 +1,4 @@ -struct TSCanvas : public wxScrolledWindow { +struct TSCanvas : public wxScrolledCanvas { MyFrame *frame; Document *doc; @@ -8,7 +8,7 @@ struct TSCanvas : public wxScrolledWindow { wxPoint lastmousepos; TSCanvas(MyFrame *fr, wxWindow *parent, const wxSize &size = wxDefaultSize) - : wxScrolledWindow(parent, wxID_ANY, wxDefaultPosition, size, + : wxScrolledCanvas(parent, wxID_ANY, wxDefaultPosition, size, wxScrolledWindowStyle | wxWANTS_CHARS), frame(fr), doc(nullptr),