protected override void OnMouseClick(MouseEventArgs e) { // // CA-14088: Clicking the general panel makes it scroll to the top // // Don't focus this control, focus its parent. Focusing this control // causes it to scroll into view, therefore flick to top on first click // if (this.Parent != null) { this.Parent.Select(); } base.OnMouseClick(e); if (level1ColWidths == null) { level1ColWidths = level1Widths(); } Point rowRelativePoint; CustomListRow selectedRow = getRowFromPoint(e.Location, out rowRelativePoint); if (selectedRow == null) { return; } selectedRow.OnMouseClick(e, rowRelativePoint); }
public void OnMouseDoubleClick(MouseEventArgs e, Point point) { if (e.Button == MouseButtons.Left) { if (DefaultMenuItem != null) { DefaultMenuItem.PerformClick(); } } if (point.Y > RowHeight + Padding.Vertical) { Point rowRelativePoint; CustomListRow row = SelectChild(point, out rowRelativePoint); if (row == null) { return; } row.OnMouseDoubleClick(e, rowRelativePoint); } else { Point itemRelativePoint; CustomListItem item = GetItemFromPosition(point, out itemRelativePoint); if (item == null) { return; } item.OnMouseDoubleClick(e, itemRelativePoint); } }
public void OnMouseDown(Point point) { if (point.Y > RowHeight + Padding.Vertical) { Point rowRelativePoint; CustomListRow row = SelectChild(point, out rowRelativePoint); if (row == null) { ParentPanel.ClearSelection(); return; } row.OnMouseDown(rowRelativePoint); } else { if (!Selectable) { return; } ParentPanel.ClearSelection(); Selected = true; ParentPanel.SelectedRow = this; ParentPanel.Invalidate(); } }
protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (level1ColWidths == null) { level1ColWidths = level1Widths(); } Point rowRelativePoint; CustomListRow row = getRowFromPoint(e.Location, out rowRelativePoint); if (row != null && row == currentRow) { currentRow.OnMouseMove(rowRelativePoint); return; } if (currentRow != null) { currentRow.OnMouseLeave(); } currentRow = row; if (currentRow != null) { currentRow.OnMouseEnter(rowRelativePoint); } }
public void OnMouseClick(MouseEventArgs e, Point point) { if (point.Y > RowHeight + Padding.Vertical) { Point rowRelativePoint; CustomListRow row = SelectChild(point, out rowRelativePoint); if (row == null) { return; } row.OnMouseClick(e, rowRelativePoint); } else { Point itemRelativePoint; CustomListItem item = GetItemFromPosition(point, out itemRelativePoint); if (item == null) { return; } item.OnMouseClick(e, itemRelativePoint); } }
public virtual void OnMouseEnter(Point point) { System.Diagnostics.Trace.Assert(currentItem == null && currentRow == null); if (point.Y > RowHeight + Padding.Vertical) { Point rowRelativePoint; currentRow = SelectChild(point, out rowRelativePoint); if (currentRow == null) { return; } currentRow.OnMouseEnter(rowRelativePoint); } else { Point itemRelativePoint; currentItem = GetItemFromPosition(point, out itemRelativePoint); if (currentItem == null) { return; } currentItem.OnMouseEnter(itemRelativePoint); } }
public void AddRow(CustomListRow row) { level1ColWidths = null; row.ParentPanel = this; Rows.Add(row); if (!InUpdate) Refresh(); }
public void AddRow(CustomListRow row) { level1ColWidths = null; row.ParentPanel = this; Rows.Add(row); if (!InUpdate) Refresh(); }
public void AddChildRow(CustomListRow parent, CustomListRow child) { level1ColWidths = null; child.ParentPanel = this; parent.AddChild(child); if (!InUpdate) Refresh(); }
public void ClearSelection() { if (SelectedRow != null) { SelectedRow.Selected = false; SelectedRow = null; Invalidate(); } }
public void AddChild(CustomListRow row) { row.Parent = this; if (this.Children.Count == 0) { row.Padding.Top = 10; } row.ParentPanel = ParentPanel; Children.Add(row); }
protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); if (currentRow != null) { currentRow.OnMouseLeave(); currentRow = null; } }
protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if (level1ColWidths == null) level1ColWidths = level1Widths(); Point rowRelativePoint; CustomListRow selectedRow = getRowFromPoint(e.Location, out rowRelativePoint); if (selectedRow == null) return; selectedRow.OnMouseDown(rowRelativePoint); }
public virtual void OnMouseLeave() { System.Diagnostics.Trace.Assert(currentItem == null || currentRow == null); if (currentItem != null) { currentItem.OnMouseLeave(); currentItem = null; } if (currentRow != null) { currentRow.OnMouseLeave(); currentRow = null; } }
protected override void OnMouseDoubleClick(MouseEventArgs e) { base.OnMouseDoubleClick(e); if (level1ColWidths == null) { level1ColWidths = level1Widths(); } Point rowRelativePoint; CustomListRow selectedRow = getRowFromPoint(e.Location, out rowRelativePoint); if (selectedRow == null) { return; } selectedRow.OnMouseDoubleClick(e, rowRelativePoint); }
public virtual void OnMouseMove(Point point) { System.Diagnostics.Trace.Assert(currentItem == null || currentRow == null); if (point.Y > RowHeight + Padding.Vertical) { if (currentItem != null) { currentItem.OnMouseLeave(); currentItem = null; } Point rowRelativePoint; CustomListRow row = SelectChild(point, out rowRelativePoint); if (row != null && currentRow == row) { currentRow.OnMouseMove(rowRelativePoint); return; } if (currentRow != null) currentRow.OnMouseLeave(); currentRow = row; if (currentRow != null) currentRow.OnMouseEnter(rowRelativePoint); } else { if(currentRow != null) { currentRow.OnMouseLeave(); currentRow = null; } Point itemRelativePoint; CustomListItem item = GetItemFromPosition(point, out itemRelativePoint); if (item != null && currentItem == item) { currentItem.OnMouseMove(itemRelativePoint); return; } if (currentItem != null) currentItem.OnMouseLeave(); currentItem = item; if (currentItem != null) currentItem.OnMouseEnter(itemRelativePoint); } }
public virtual void OnMouseLeave() { System.Diagnostics.Trace.Assert(currentItem == null || currentRow == null); if (currentItem != null) { currentItem.OnMouseLeave(); currentItem = null; } if (currentRow != null) { currentRow.OnMouseLeave(); currentRow = null; } }
public void AddChild(CustomListRow row) { row.Parent = this; if (this.Children.Count == 0) row.Padding.Top = 10; row.ParentPanel = ParentPanel; Children.Add(row); }
public virtual void OnMouseEnter(Point point) { System.Diagnostics.Trace.Assert(currentItem == null && currentRow == null); if (point.Y > RowHeight + Padding.Vertical) { Point rowRelativePoint; currentRow = SelectChild(point, out rowRelativePoint); if (currentRow == null) return; currentRow.OnMouseEnter(rowRelativePoint); } else { Point itemRelativePoint; currentItem = GetItemFromPosition(point, out itemRelativePoint); if (currentItem == null) return; currentItem.OnMouseEnter(itemRelativePoint); } }
protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (level1ColWidths == null) level1ColWidths = level1Widths(); Point rowRelativePoint; CustomListRow row = getRowFromPoint(e.Location, out rowRelativePoint); if (row != null && row == currentRow) { currentRow.OnMouseMove(rowRelativePoint); return; } if (currentRow != null) currentRow.OnMouseLeave(); currentRow = row; if (currentRow != null) currentRow.OnMouseEnter(rowRelativePoint); }
public void AddItemToRow(CustomListRow row, CustomListItem item) { row.AddItem(item); Refresh(); }
protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); if (currentRow != null) { currentRow.OnMouseLeave(); currentRow = null; } }
public void AddItemToRow(CustomListRow row, CustomListItem item) { row.AddItem(item); Refresh(); }
public void ClearSelection() { if (SelectedRow != null) { SelectedRow.Selected = false; SelectedRow = null; Invalidate(); } }
public void AddChildRow(CustomListRow parent, CustomListRow child) { level1ColWidths = null; child.ParentPanel = this; parent.AddChild(child); if (!InUpdate) Refresh(); }
public virtual void OnMouseMove(Point point) { System.Diagnostics.Trace.Assert(currentItem == null || currentRow == null); if (point.Y > RowHeight + Padding.Vertical) { if (currentItem != null) { currentItem.OnMouseLeave(); currentItem = null; } Point rowRelativePoint; CustomListRow row = SelectChild(point, out rowRelativePoint); if (row != null && currentRow == row) { currentRow.OnMouseMove(rowRelativePoint); return; } if (currentRow != null) { currentRow.OnMouseLeave(); } currentRow = row; if (currentRow != null) { currentRow.OnMouseEnter(rowRelativePoint); } } else { if (currentRow != null) { currentRow.OnMouseLeave(); currentRow = null; } Point itemRelativePoint; CustomListItem item = GetItemFromPosition(point, out itemRelativePoint); if (item != null && currentItem == item) { currentItem.OnMouseMove(itemRelativePoint); return; } if (currentItem != null) { currentItem.OnMouseLeave(); } currentItem = item; if (currentItem != null) { currentItem.OnMouseEnter(itemRelativePoint); } } }