Hallo Leute,
mal wieder eine Frage zu ZedGraph 😁
Hat jemand schonmal die FindNearestObject Funktion verwendet?
public bool FindNearestObject(
PointF mousePt,
Graphics g,
out Object nearestObj,
out int index
)
Was ich machen möchte: Bei Doppelklick des Benutzers auf den Titel oder Achsentitel soll er diesen bearbeiten können. Ich denke dafür wäre diese Funktion gut geeignet, wie sich auch aus der Anleitung herauslesen lässt:
This method will search through all of the graph objects, such as Axis, Legend, Title, GraphObj, and CurveItem. If the mouse point is within the bounding box of the items (or in the case of ArrowObj and CurveItem, within NearestTol pixels), then the object will be returned. You must check the type of the object to determine what object was selected (for example, "if ( object is Legend ) ..."). The parameter returns the index number of the item within the selected object (such as the point number within a CurveItem object.
Ich weiß nur nicht so recht, wo ich das Graphics-Objekt herbekommen soll, das die von mir will. Hat jemand schonmal mit dieser Funktion gearbeitet?
Danke und Grüße
MrLeeh