private int DrawRow(CustomHistoryRow row, Graphics g, int top, int visibleTop, int visibleBottom) { Rectangle rowbounds = new Rectangle(CustomHistoryRow.Margin.Left, top + CustomHistoryRow.Margin.Top, Width - CustomHistoryRow.Margin.Horizontal, Int32.MaxValue); return(row.DrawSelf(g, rowbounds, visibleTop, visibleBottom)); }
protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); int top = 0; Point mousePoint = PointToClient(MousePosition); CustomHistoryRow row = getRowFromPoint(mousePoint, ref top); if (row != null) { row.Click(new Point(mousePoint.X, mousePoint.Y - top), e.Button); } }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); int top = 0; Point mousePoint = PointToClient(MousePosition); CustomHistoryRow row = getRowFromPoint(mousePoint, ref top); if (row != null) { row.MouseUp(new Point(mousePoint.X, mousePoint.Y - top), e.Button); } foreach (CustomHistoryRow r in Rows) { r.ButtonPressed = false; } Invalidate(); Refresh(); }
public void AddItem(CustomHistoryRow row) { row.ParentPanel = this; Rows.Insert(0,row); Refresh(); }
private int DrawRow(CustomHistoryRow row, Graphics g, int top, int visibleTop, int visibleBottom) { Rectangle rowbounds = new Rectangle(CustomHistoryRow.Margin.Left, top + CustomHistoryRow.Margin.Top, Width - CustomHistoryRow.Margin.Horizontal, Int32.MaxValue); return row.DrawSelf(g, rowbounds, visibleTop, visibleBottom); }
public void AddItem(CustomHistoryRow row) { row.ParentPanel = this; Rows.Insert(0, row); Refresh(); }