BrightIdeasSoftware.ObjectListView.ProcessLButtonDown C# (CSharp) Method

ProcessLButtonDown() protected method

Handle a left mouse down at the given hit test location
Subclasses can override this to do something unique
protected ProcessLButtonDown ( OlvListViewHitTestInfo hti ) : bool
hti OlvListViewHitTestInfo
return bool
        protected virtual bool ProcessLButtonDown(OlvListViewHitTestInfo hti)
        {
            if (hti.Item == null)
                return false;

            // If they didn't click checkbox, we can just return
            if (this.View != View.Details || hti.HitTestLocation != HitTestLocation.CheckBox)
                return false;

            // Did they click a sub item checkbox?
            if (hti.Column.Index > 0) {
                if (hti.Column.IsEditable)
                    this.ToggleSubItemCheckBox(hti.RowObject, hti.Column);
                return true;
            }

            // They must have clicked the primary checkbox
            this.ToggleCheckObject(hti.RowObject);

            // If they change the checkbox of a selecte row, all the rows in the selection
            // should be given the same state
            if (hti.Item.Selected) {
                CheckState? state = this.GetCheckState(hti.RowObject);
                if (state.HasValue) {
                    foreach (Object x in this.SelectedObjects)
                        this.SetObjectCheckedness(x, state.Value);
                }
            }

            return true;
        }
ObjectListView