wxEVT_AUINOTEBOOK_BUTTON event broken for wxAuiNotebook (Issue #26801)

10 views
Skip to first unread message

BazaarAcc32

unread,
Aug 8, 2026, 8:47:08 AM (2 days ago) Aug 8
to wx-...@googlegroups.com, Subscribed
BazaarAcc32 created an issue (wxWidgets/wxWidgets#26801)

Description

After upgrading from wxWidgets 3.3.0 to 3.3.3, wxEVT_AUINOTEBOOK_BUTTON event
The wxEVT_AUINOTEBOOK_BUTTON event is no longer triggered by wxAuiNotebook. According to the source code, wxAuiNotebook never triggers this event in version 3.3.3.

Expected vs observed behaviour:

I expect that when clicking on tools (both built-in ones like wxAUI_NB_CLOSE_BUTTON and custom ones added via wxAuiTabContainer::AddButton) an wxEVT_AUINOTEBOOK_BUTTON event will be triggered

To Reproduce:

#include <wx/wx.h>
#include <wx/aui/aui.h>

enum { ID_NOTEBOOK = wxID_HIGHEST + 1 };

class MyFrame : public wxFrame
{
public:
    MyFrame()
        : wxFrame(nullptr, wxID_ANY, "AuiNotebook button", wxDefaultPosition, wxSize(800, 500))
    {
        auto* notebook = new wxAuiNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize,
            wxAUI_NB_DEFAULT_STYLE | wxAUI_NB_CLOSE_BUTTON | wxAUI_NB_WINDOWLIST_BUTTON);

        notebook->AddPage(new wxPanel(notebook), "First page");
        notebook->AddPage(new wxPanel(notebook), "Second page");

        notebook->Bind(wxEVT_AUINOTEBOOK_BUTTON, &MyFrame::OnNotebookButton, this);
    }

private:
    void OnNotebookButton(wxAuiNotebookEvent& event)
    {
        const int button = event.GetInt();

        if (button == wxAUI_BUTTON_CLOSE)
        {
            wxLogMessage("Close button clicked");
        }

        event.Skip();
    }
};

class MyApp : public wxApp
{
public:
    bool OnInit() override
    {
        auto* frame = new MyFrame();
        frame->Show();
        return true;
    }
};

wxIMPLEMENT_APP(MyApp);

Platform and version information

  • wxWidgets version you use: 3.3.3
  • wxWidgets port you use: wxMSW
  • OS and its version: Windows 11
    • Current theme:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26801@github.com>

VZ

unread,
Aug 9, 2026, 1:16:03 PM (13 hours ago) Aug 9
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26801)

This was broken by 48bf1ac (Rewrite event generation and propagation in wxAuiNotebook, 2025-07-12), as I didn't realize that it was a public event. This will need to be restored, without reintroducing the original problem from #25544.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26801/5232738629@github.com>

Reply all
Reply to author
Forward
0 new messages