public PropertyEditor PickEditorAt(int x, int y, bool ownChildrenOnly = false) { Rectangle indentClientRect = this.ClientRectangle; indentClientRect.X += this.indent; indentClientRect.Width -= this.indent; if (this.expanded && indentClientRect.Contains(new Point(x, y))) { foreach (PropertyEditor child in this.propertyEditors) { if (child.EditorRectangle.Contains(x, y)) { GroupedPropertyEditor groupedEditor = child as GroupedPropertyEditor; if (groupedEditor != null && !ownChildrenOnly) { return(groupedEditor.PickEditorAt(x, y)); } else { return(child); } } } } return(this); }
public PropertyEditor PickEditorAt(int x, int y, bool scrolled = false) { if (this.mainEditor == null) { return(null); } if (scrolled) { x -= this.AutoScrollPosition.X; y -= this.AutoScrollPosition.Y; } GroupedPropertyEditor groupedMainEdit = this.mainEditor as GroupedPropertyEditor; return(groupedMainEdit != null?groupedMainEdit.PickEditorAt(x - this.ClientRectangle.X, y - this.ClientRectangle.Y) : this.mainEditor); }