Hi!
I have the problem:
I have the GoPalette. If I click on some of objects of GoPalette, fairly often It doesn’t select. The GoPalette contains GoIconicNode objects. Only if I click exactly on some of lines of an object, then it stands as selected. It’s difficult and not convenient to select objects only if you will click exactly by line of some object. Is there any way to select an object if you have clicked near it? I have tried to resolve this problem the following way:
- I declared the class MyGoPalette, which is derrived from GoPalette
- Overrided the method OnClick:
protected override void OnClick(EventArgs e)
{
var p = this.PointToClient(Cursor.Position);
var ob = this.PickObjectsInRectangle(true, false, new RectangleF(p, new SizeF(10, 10)), GoPickInRectangleStyle.SelectableOnlyIntersectsBounds, null, 1).FirstOrDefault();
if (ob != null)
{
this.Selection.Add(ob);
}
base.OnClick(e);
}
It seems the method PointToClient doesn’t return correct coords…
What do i do wrong?
Thanks!