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 ) );
#include "XCCalendarDayEntry.h"
#include "../common/events.h"
-class XCCalendarDay: public wxFrame
+class XCCalendarDay: public wxPanel
{
private:
wxFlexGridSizer *WindowSizer = new wxFlexGridSizer(2, 1, 0, 0);
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);