i am using wxWidgets on Windows 10 and
Code: Select all
wxAuiNotebook::OnLeftUp
Code: Select all
wxAuiNotebook::OnAux1Up
What works is event:
Code: Select all
wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP
How to get this event to work ? Just want to know, when the mouse left clicks on the tab page.
I have just 1 page. So changed and changing event not working.
I want to add a page when the first page is clicked. First page lable is a '+'. So that's the background.
Code: Select all
panel_nb_periods::panel_nb_periods( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
m_mgr.SetManagedWindow(this);
m_mgr.SetFlags(wxAUI_MGR_DEFAULT);
_nb_periods = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP );
m_mgr.AddPane( _nb_periods, wxAuiPaneInfo() .Center() .PinButton( true ).Dock().Resizable().FloatingSize( wxDefaultSize ).BottomDockable( false ).TopDockable( false ).LeftDockable( false ).RightDockable( false ).Floatable( false ) );
m_mgr.Update();
// Connect Events
_nb_periods->Connect( wxEVT_AUX1_UP, wxMouseEventHandler( panel_nb_periods::on_mouse_nb_up ), NULL, this );
_nb_periods->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( panel_nb_periods::on_left_up ), NULL, this );
_nb_periods->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( panel_nb_periods::on_page_change ), NULL, this );
}
panel_nb_periods::~panel_nb_periods()
{
// Disconnect Events
_nb_periods->Disconnect( wxEVT_AUX1_UP, wxMouseEventHandler( panel_nb_periods::on_mouse_nb_up ), NULL, this );
_nb_periods->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( panel_nb_periods::on_left_up ), NULL, this );
_nb_periods->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( panel_nb_periods::on_page_change ), NULL, this );
m_mgr.UnInit();
}