Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
XCCalendarManipulator: Show simple border for buttons on mouse over and no border...
[xestiacalendar/.git] / source / widgets / XCCalendarManipulator.cpp
index c71692c..131146f 100644 (file)
@@ -110,11 +110,20 @@ XCCalendarManipulator::XCCalendarManipulator(wxWindow* parent, const wxString& t
        // Setup the event controls.
 
        dateButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(XCCalendarManipulator::DateTextClick), NULL, this);
+       dateButton->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseover), NULL, this);
+       dateButton->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseout), NULL, this);
        nextButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(XCCalendarManipulator::NextMonth), NULL, this);
+       nextButton->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseover), NULL, this);
+       nextButton->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseout), NULL, this);
        calendarsButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(XCCalendarManipulator::ShowCalendarsList), NULL, this);
+       calendarsButton->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseover), NULL, this);
+       calendarsButton->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseout), NULL, this);
        previousButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(XCCalendarManipulator::PreviousMonth), NULL, this);
-       
+       previousButton->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseover), NULL, this);
+       previousButton->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseout), NULL, this);
        Bind(XCCALENDARMANIPULATOR_CHANGEGRID, &XCCalendarManipulator::ChangeGrid, this, ID_CHANGEGRID);
+
+       this->Refresh();
 }
 
 XCCalendarManipulator::~XCCalendarManipulator(){
@@ -308,4 +317,16 @@ vector<int> XCCalendarManipulator::GetHiddenCalendarsList(){
        
        return calendarList->GetHiddenCalendarsList();
        
+}
+
+void XCCalendarManipulator::ButtonMouseover(wxMouseEvent &event)
+{
+       wxWindow *eventObject = (wxWindow*)event.GetEventObject();
+       eventObject->SetWindowStyle(0 | wxSIMPLE_BORDER);
+}
+
+void XCCalendarManipulator::ButtonMouseout(wxMouseEvent &event)
+{
+       wxWindow *eventObject = (wxWindow*)event.GetEventObject();
+       eventObject->SetWindowStyle(0 | wxNO_BORDER);
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy