Generate help events with the IDs of wxToolBar tools (PR #25820)

33 views
Skip to first unread message

VZ

unread,
Sep 20, 2025, 7:48:10 AM (5 days ago) Sep 20
to wx-...@googlegroups.com, Subscribed

This is more useful than generating the events with the ID of the toolbar itself, as help is typically associated with a particular tool and not the entire toolbar.

Add wxWindow::GetHelpIdAtPoint() virtual function to allow customizing this for the other controls as well.

Closes #25802.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/25820

Commit Summary

  • c3de65f Generate help events with the IDs of wxToolBar tools

File Changes

(6 files)

Patch Links:


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/pull/25820@github.com>

VZ

unread,
Sep 20, 2025, 7:55:40 AM (5 days ago) Sep 20
to wx-...@googlegroups.com, Push

@vadz pushed 1 commit.

  • a6499b0 Generate help events with the IDs of wxToolBar tools


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25820/before/c3de65f446db182cc9e829a55c59a3fc088314ae/after/a6499b006dcaed7d0044c5b2d8f183874058ce40@github.com>

StevenPHirshman

unread,
Sep 20, 2025, 9:04:14 AM (5 days ago) Sep 20
to wx-...@googlegroups.com, Subscribed
StevenPHirshman left a comment (wxWidgets/wxWidgets#25820)

I tested it on my PC and it worked. The checks completed successfully (1 pending, 42 successful).m Thanks for your help. Obviously you know the structure of the repository much better than I do.


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/pull/25820/c3314957993@github.com>

VZ

unread,
Sep 23, 2025, 9:10:51 AM (2 days ago) Sep 23
to wx-...@googlegroups.com, Subscribed

Closed #25820 via cd5e67f.


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/pull/25820/issue_event/19866312865@github.com>

StevenPHirshman

unread,
Sep 23, 2025, 1:27:06 PM (2 days ago) Sep 23
to wx-...@googlegroups.com, Subscribed
StevenPHirshman left a comment (wxWidgets/wxWidgets#25820)
Thank you for your help. Any thought about the related issue mentioned originally, namely, getting context help to open a menu item?

***@***.***

From: VZ ***@***.***>
Sent: Tuesday, September 23, 2025 9:11 AM
To: wxWidgets/wxWidgets ***@***.***>
Cc: StevenPHirshman ***@***.***>; Comment ***@***.***>
Subject: Re: [wxWidgets/wxWidgets] Generate help events with the IDs of wxToolBar tools (PR #25820)


Closed #25820<https://github.com/wxWidgets/wxWidgets/pull/25820> via cd5e67f<https://github.com/wxWidgets/wxWidgets/commit/cd5e67feb96271d3b57a25b9f70cf0ddedcb176c>.


Reply to this email directly, view it on GitHub<https://github.com/wxWidgets/wxWidgets/pull/25820#event-19866312865>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BNH2DLC7BDFR5OQTBBJ7VML3UFBFJAVCNFSM6AAAAACHBFUVZGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJZHA3DMMZRGI4DMNI>.
You are receiving this because you commented.Message ID: ***@***.***>


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/pull/25820/c3324920684@github.com>

VZ

unread,
Sep 23, 2025, 3:20:14 PM (2 days ago) Sep 23
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25820)

Thank you for your help. Any thought about the related issue mentioned originally, namely, getting context help to open a menu item?

I don't know of any way to do this, sorry.


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/pull/25820/c3325251155@github.com>

StevenPHirshman

unread,
Sep 23, 2025, 9:38:10 PM (2 days ago) Sep 23
to wx-...@googlegroups.com, Subscribed
StevenPHirshman left a comment (wxWidgets/wxWidgets#25820)

I don't know of any way to do this, sorry.

We had discussed a partial solution before you helped incorporate the virtual function GetHelpIdAtPoint into the context help file (which fixed the context help for toolbars). Namely, if I bypass the cshelp mechanism entirely when the context help button is clicked, and replace the frame call to

wxContextHelp contextHelp(this);

with

m_bContext=true;
//add code here to change the cursor to the context "?" cursor; change back in menu/toolbar handler

Now the cursor is changed to "?" and when the user clicks a toolbar button OR a file menu item, the event handler for that item is invoked (NOT the wxEVT_HELP event since we haven't change to cs mode). In each event handler, one just needs to add a small function (IsContext, which returns m_bContext) to check the ciontext state and invoke the ShowHelp function.

The ONLY problem with this is that when the cursor leaves the frame area, it reverts to the normal (pointer) cursor. I can still click any menu header (like File or Edit) and it opens the menu list, and then click a menu item, and that works too. However, I can't figure out how to maintain the "?" cursor when the pointer leaves the main window. I tried setting the global cursor and not just the local cursor, but it still changes when the pointer leaves the main window. Do you know any way to KEEP the context cursor from changing (until the click is subsequently handled)?


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/pull/25820/c3326132254@github.com>

Reply all
Reply to author
Forward
0 new messages