From 8efa97c5dfa045afb197d2e90a0ebab707f60a91 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 26 Jun 2016 13:24:56 +0100 Subject: [PATCH] XCCalendarDay changed from wxFrame to wxPanel --- source/widgets/XCCalendarDay.cpp | 9 ++++----- source/widgets/XCCalendarDay.h | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/source/widgets/XCCalendarDay.cpp b/source/widgets/XCCalendarDay.cpp index 6ff7175..2b5eabb 100644 --- a/source/widgets/XCCalendarDay.cpp +++ b/source/widgets/XCCalendarDay.cpp @@ -20,16 +20,15 @@ using namespace std; -BEGIN_EVENT_TABLE(XCCalendarDay, wxFrame) +BEGIN_EVENT_TABLE(XCCalendarDay, wxPanel) EVT_PAINT(XCCalendarDay::PaintFrameEvent) EVT_SIZE(XCCalendarDay::ResizeFrameEvent) //EVT_COMMAND(wxID_ANY, XCCALENDARDAY_DESELECTOTHERENTRIES, XCCalendarDay::DeselectOthersEvent) END_EVENT_TABLE() -XCCalendarDay::XCCalendarDay(const wxString& title, const wxPoint& pos, const wxSize& size) - : wxFrame(NULL, wxID_ANY, title, pos, size) -{ - +XCCalendarDay::XCCalendarDay(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size) + : wxPanel(parent, wxID_ANY, pos, size, wxTAB_TRAVERSAL, title){ + Connect(wxID_ANY, XCCALENDARDAY_DESELECTOTHERENTRIES, wxCommandEventHandler(XCCalendarDay::DeselectOthersEvent)); this->SetMinSize( wxSize( 100,100 ) ); diff --git a/source/widgets/XCCalendarDay.h b/source/widgets/XCCalendarDay.h index 0a409ce..d70594a 100644 --- a/source/widgets/XCCalendarDay.h +++ b/source/widgets/XCCalendarDay.h @@ -26,7 +26,7 @@ #include "XCCalendarDayEntry.h" #include "../common/events.h" -class XCCalendarDay: public wxFrame +class XCCalendarDay: public wxPanel { private: wxFlexGridSizer *WindowSizer = new wxFlexGridSizer(2, 1, 0, 0); @@ -56,7 +56,7 @@ class XCCalendarDay: public wxFrame void Repaint(); public: - XCCalendarDay(const wxString& title, const wxPoint& pos, const wxSize& size); + XCCalendarDay(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size); ~XCCalendarDay(); void PaintFrameEvent(wxPaintEvent &PaintEvent); void ResizeFrameEvent(wxSizeEvent &SizeEvent); -- 2.39.5