protected override void OnCellOver(CellOverEventArgs args) { bool invalidate = false; if (args.Item != null && ((RowObject)args.Item.RowObject).CanRevealValue && args.Location.X > args.Item.Bounds.Width - EyeRegionWidth) { mMouseInReveal = true; Cursor = Cursors.Hand; args.SubItem.Decoration = EyeDecoration; invalidate = true; } else if (mMouseInReveal) { mMouseInReveal = false; Cursor = Cursors.Default; if (!((RowObject)args.Item.RowObject).RevealValue) { args.SubItem.Decoration = EyeGreyDecoration; } invalidate = true; } if (invalidate) { var bounds = args.Item.Bounds; bounds.X = bounds.Width - EyeRegionWidth; bounds.Width = EyeRegionWidth; Invalidate(bounds); } base.OnCellOver(args); }
private void Params_CellOver(object sender, CellOverEventArgs e) { if (e.ColumnIndex == 4 || e.ColumnIndex == 5) { // toolTip1.Show(e.HitTest.Item.Text, this.Parent, 3000); } }
private void objectListView1_CellOver(object sender, CellOverEventArgs e) { //if (e.ColumnIndex == this.olvColumn1.Index) // Cursor.Current = Cursors.Hand; //else // Cursor.Current = Cursors.Default; }
protected virtual void OnCellOver(CellOverEventArgs args) { if (this.CellOver != null) { this.CellOver(this, args); } }
private void objectListView1_CellOver(object sender, CellOverEventArgs e) { if (e != null && e.Item != null) { e.Item.BackColor = Color.White; alertsTable.RedrawItems(0, alertsTable.Items.Count - 1, false); } }
private void olvInstalledCars_CellOver(object sender, CellOverEventArgs e) { if (e.RowIndex < 0) { return; //disable on header } if (e.Column == col2Sound) { olvInstalledCars.Cursor = Cursors.Hand; } else { olvInstalledCars.Cursor = Cursors.Default; } }
private void listView_CellOver(object sender, CellOverEventArgs e) { if (e.Column != null && e.ColumnIndex == 2) { if (e.SubItem.Text == "********") { e.SubItem.Text = passList[e.RowIndex]; cell = new Point(e.RowIndex, e.ColumnIndex); } Point here = new Point(e.RowIndex, e.ColumnIndex); if (cell != here) { listView.Items[cell.X].SubItems[cell.Y].Text = "********"; } } }
// We could change the hot item on the mouse hover event, but it looks wrong. //protected override void OnMouseHover(EventArgs e) //{ // base.OnMouseHover(e); // this.UpdateHotItem(this.PointToClient(Cursor.Position)); //} /// <summary> /// When the mouse moves, we might need to change the hot item. /// </summary> /// <param name="e"></param> protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (!this.Created) return; CellOverEventArgs args = new CellOverEventArgs(); this.BuildCellEvent(args, e.Location); this.OnCellOver(args); this.MouseMoveHitTest = args.HitTest; if (!args.Handled) { this.UpdateHotItem(args.HitTest); } }
/// <summary> /// /// </summary> /// <param name="args"></param> protected virtual void OnCellOver(CellOverEventArgs args) { if (this.CellOver != null) this.CellOver(this, args); }
// We could change the hot item on the mouse hover event, but it looks wrong. //protected override void OnMouseHover(EventArgs e) { // System.Diagnostics.Debug.WriteLine(String.Format("OnMouseHover")); // base.OnMouseHover(e); // this.UpdateHotItem(this.PointToClient(Cursor.Position)); //} /// <summary> /// When the mouse moves, we might need to change the hot item. /// </summary> /// <param name="e"></param> protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (!this.Created) return; //System.Diagnostics.Debug.WriteLine(String.Format("MouseMove: {0}", e.Location)); CellOverEventArgs args = new CellOverEventArgs(); this.BuildCellEvent(args, e.Location); this.OnCellOver(args); this.MouseMoveHitTest = args.HitTest; if (!args.Handled) this.UpdateHotItem(args.HitTest); }
internal void HandleMouseMove(Point pt) { // System.Diagnostics.Debug.WriteLine(String.Format("HandleMouseMove: {0}", pt)); CellOverEventArgs args = new CellOverEventArgs(); this.BuildCellEvent(args, pt); this.OnCellOver(args); this.MouseMoveHitTest = args.HitTest; if (!args.Handled) this.UpdateHotItem(args.HitTest); }
private void list_CellOver(object sender, CellOverEventArgs e) { e.Handled = true; }
private void listView_CellOver(object sender, CellOverEventArgs e) { if (e.Column != null && e.ColumnIndex == 2) { if (e.SubItem.Text == "********") { e.SubItem.Text = passList[e.RowIndex]; cell = new Point(e.RowIndex, e.ColumnIndex); } Point here = new Point(e.RowIndex, e.ColumnIndex); if (cell != here) listView.Items[cell.X].SubItems[cell.Y].Text = "********"; } }
private void objectListView1_CellOver(object sender, CellOverEventArgs e) { Point cursor = Cursor.Position; cursor = PointToClient(cursor); int x = cursor.X - objectListView1.Location.X - 2; int y = cursor.Y - objectListView1.Location.Y - 2; OLVColumn hitColumn; ListViewItem hoverItem = objectListView1.GetItemAt(x, y, out hitColumn); if (hoverItem != null) { ContestantListLine modelItem = (ContestantListLine)objectListView1.GetModelObject(hoverItem.Index); if (hitColumn != null && hitColumn.Tag != null && !(modelItem is RoundDivider)) { if (hitColumn.Tag.ToString() == "grabColumn") Cursor = moveHandCursor; else Cursor = Cursors.Default; } } }