From fa7c01888572082250123ca95f15acf477be36cf Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Thu, 28 Mar 2024 22:36:17 +0100 Subject: [PATCH] Replace wxScrolledWindow with wxScrolledCanvas (#616) According to , `wxScrolledCanvas` is more suited to the use case of TreeSheets as there are no child controls in `TSCanvas`. --- src/mycanvas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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),