protected override void CheckMouseCursor(LookUpPopupHitTest ht) { if (prevPoint.X != ht.Point.X || prevPoint.Y != ht.Point.Y) { prevPoint = ht.Point; LookUpEditHints le = this.OwnerEdit as LookUpEditHints; LookUpColumnInfo column; int columnPos = -1; for (int i = 0; i < this.OwnerEdit.Properties.Columns.Count; i++) { column = this.OwnerEdit.Properties.Columns[i]; if (column.FieldName == le.Properties.DescriptionField) { columnPos = i; break; } } if (columnPos != -1) { if (ht.HitType == LookUpPopupHitType.Row) { if (ht.Index != prevRowIndex) { tt.HideHint(); prevRowIndex = ht.Index; } tt.ShowHint(dt.Rows[ht.Index][columnPos].ToString()); } } } base.CheckMouseCursor(ht); }
public PopupLookUpEditHintsForm(LookUpEditHints ownerEdit) : base(ownerEdit) { if (this.OwnerEdit.ToolTipController == null) { tt = ToolTipController.DefaultController; } tt.BeforeShow += new ToolTipControllerBeforeShowEventHandler(tt_BeforeShow); dt = this.OwnerEdit.Properties.DataSource as DataTable; }
void tt_BeforeShow(object sender, ToolTipControllerShowEventArgs e) { LookUpEditHints le = OwnerEdit as LookUpEditHints; le.Properties.OnBeforeShowingTooltip(e); }