This allows to handle events from the info bar buttons in the derived classes
using the event tables while if the base class used Connect(), the derived
classes static event handlers would be never executed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62278
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// the original parent background colour, before we changed it
wxColour m_origParentBgCol;
// the original parent background colour, before we changed it
wxColour m_origParentBgCol;
wxDECLARE_NO_COPY_CLASS(wxInfoBarGeneric);
};
wxDECLARE_NO_COPY_CLASS(wxInfoBarGeneric);
};
#include "wx/scopeguard.h"
#include "wx/sizer.h"
#include "wx/scopeguard.h"
#include "wx/sizer.h"
+BEGIN_EVENT_TABLE(wxInfoBarGeneric, wxInfoBarBase)
+ EVT_BUTTON(wxID_ANY, wxInfoBarGeneric::OnButton)
+END_EVENT_TABLE()
+
// ============================================================================
// implementation
// ============================================================================
// ============================================================================
// implementation
// ============================================================================
);
m_button->SetToolTip(_("Hide this notification message."));
);
m_button->SetToolTip(_("Hide this notification message."));
- Connect
- (
- wxEVT_COMMAND_BUTTON_CLICKED,
- wxCommandEventHandler(wxInfoBarGeneric::OnButton),
- NULL,
- this
- );
-
// center the text inside the sizer with an icon to the left of it and a
// button at the very right
//
// center the text inside the sizer with an icon to the left of it and a
// button at the very right
//