Hi there,
I am adding an annotation to my Gantt chart and I am using primitive.Caps = PCaps.HitTest to respond to the mouseover event.
Please can you advise how I now respond to a mouse click event on this annotation to identify the annotation that has been clicked on.
I raised a similar question last year but can not find that answer in the forums now.
Thanks in advance,
Matt
You can try the following code:
box.Location.LocationX = 50;
box.Location.LocationY = 50;
this.ultraChart1.ChartDrawItem += new Infragistics.UltraChart.Shared.Events.ChartDrawItemEventHandler(ultraChart1_ChartDrawItem);
this.ultraChart1.ChartDataClicked += new Infragistics.UltraChart.Shared.Events.ChartDataClickedEventHandler(ultraChart1_ChartDataClicked);
...
{
}
// do something
box.Caps = PCaps.HitTest;
Hi, I'm trying to do the same thing, respond to a mouse click on an annotation. The code you show does execute when I click on an annotation but how do I find which annotation was clicked?
Also, when I click on an annotation the event seems to be fired once for each annotation on the chart, although it always passes the same box, or at least it has the same rectangle of the one that was clicked. Any ideas on how to ensure it only fires once?
Thanks.
Brian