From: Steve Brokenshire Date: Sun, 26 Jun 2016 12:24:56 +0000 (+0100) Subject: XCCalendarDay changed from wxFrame to wxPanel X-Git-Tag: release-0.02~110 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=8efa97c5dfa045afb197d2e90a0ebab707f60a91;p=xestiacalendar%2F.git XCCalendarDay changed from wxFrame to wxPanel --- 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);