wxWindow::PopupMenu() does not use wxEVT_UPDATE_UI (Issue #24641)

10 views
Skip to first unread message

Bill Su

unread,
Jun 24, 2024, 11:07:53 PM (10 days ago) Jun 24
to wx-...@googlegroups.com, Subscribed

Bug description:

When wxWindow::PopupMenu(menu) is called, menu is not updated by wxEVT_UPDATE_UI.

Expected vs observed behaviour:

I expect that wxWindow::PopupMenu(menu) will update menu according to the usual wxEVT_UPDATE_UI handlers. This does not happen unless the window is a wxFrameBase.

Patch or snippet allowing to reproduce the problem:

popupmenu-missing-updateui-demo.patch

This patch adds wxUpdateUIEvent handlers to the popup menus for both the frame and the dialog that should disable the menu item to display the About box. However, the dialog's popup menu still has the About menu item enabled.

To Reproduce:

  1. Apply the attached patch
  2. Run the menu sample
  3. Display the popup menu for the frame, and observe that the About menu item is disabled
  4. Open the dialog (e.g., use Ctrl+D)
  5. Display the popup menu for the dialog, and observe that the About menu item is ENabled

Platform and version information

  • wxWidgets version you use: master ~2024/06/24
  • wxWidgets port you use: wxMSW
  • OS and its version: MS Windows 10 22H2


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24641@github.com>

VZ

unread,
Jul 3, 2024, 7:34:59 PM (2 days ago) Jul 3
to wx-...@googlegroups.com, Subscribed

Closed #24641 as completed via f01e1a9.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/24641/issue_event/13387415333@github.com>

Reply all
Reply to author
Forward
0 new messages