Skip to content

Commit

Permalink
Replace wxScrolledWindow with wxScrolledCanvas (#616)
Browse files Browse the repository at this point in the history
According to <https://docs.wxwidgets.org/3.2.5/classwx_scrolled.html>,
`wxScrolledCanvas` is more suited to the use case of TreeSheets
as there are no child controls in `TSCanvas`.
  • Loading branch information
tobiolo authored Mar 28, 2024
1 parent c019a5b commit fa7c018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mycanvas.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
struct TSCanvas : public wxScrolledWindow {
struct TSCanvas : public wxScrolledCanvas {
MyFrame *frame;
Document *doc;

Expand All @@ -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),
Expand Down

0 comments on commit fa7c018

Please sign in to comment.