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;
}