Skip to content

Notification of a clickable legend (or other clickable things)? #11

Answered by utelle
tonyvsuk asked this question in Q&A
Discussion options

You must be logged in to vote

Is it possible?

Sure. Many of the samples implemented in the wxDemo application have clickable data elements. If you move the mouse pointer over the displayed sample graphics the "arrow" mouse pointer changes to a "hand" mouse pointer. If you then do a left mouse click, a modal dialog pops up showing the attributes of the clicked element.

I've been struggling to find out how to do it. I asked over on the ChartDirector forum, and I see I need to use getHTMLImageMap. But how do I get notified if someone clicks something?

I'm assuming I need to intercept the wxEVT_CHARTVIEWER_CLICKED event.

Correct.

void YourChartDialog::OnClickChart(wxCommandEvent& event)
{
  wxChartViewer* viewer = (wx…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tonyvsuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants