private void PathPanel_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { foreach (Obstacle Obs in Obstacles) { if (Obs.Intersect(e.Location)) { if (Obs.Name != "") { toolTip1.Active = true; toolTip1.ToolTipTitle = "Object Name :"; toolTip1.Show(Obs.Name, this); } else { ObstacleInfo OI = new ObstacleInfo(); OI.StartPosition = FormStartPosition.CenterScreen; OI.PathPanelRef = this; OI.ShowDialog(); Obs.Name = TempName; TempName = ""; } break; } } } }