11-03-2005 01:49 PM
The System.EventArgs e is empty.
11-03-2005 02:54 PM
You can do this by handling the Legend.MouseDown or Legend.MouseUp event and then using the Legend.GetItemAt method with the X/Y properties from the event arguments. If Legend.GetItemAt returns a non-null reference, that is the legend item that you clicked on. For example:
private void OnLegendMouseUp(object sender, MouseEventArgs e) { LegendItem item = legend1.GetItemAt(e.X, e.Y); if (item != null) MessageBox.Show(item.Text); }
- Elton
11-03-2005 03:04 PM