/// ------------------------------------------------------------------------------------ protected override void OnCellMouseEnter(DataGridViewCellEventArgs e) { base.OnCellMouseEnter(e); // This will not be empty when the mouse button is down. if (MouseButtons != MouseButtons.None || e.ColumnIndex < 0 || e.RowIndex < 0 || !App.IsFormActive(FindForm())) { return; } var rc = GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, false); if (m_phoneInfoPopup.Initialize(this[e.ColumnIndex, e.RowIndex])) { m_phoneInfoPopup.Show(rc); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Display a phone's information popup. /// </summary> /// ------------------------------------------------------------------------------------ private void HandleMouseEnter(object sender, EventArgs e) { var bar = sender as HistogramBar; var lbl = sender as Label; var useLabelForInfoPopup = (bar == null); if (bar == null) { if (lbl != null) { bar = lbl.Tag as HistogramBar; } // Uncomment if the magnified tooltip of a histogram's phone is desired. //m_phoneToolTip.Show(lbl.Text, this); } if (bar != null && _phoneInfoPopup.Initialize(bar.Phone)) { _phoneInfoPopup.Show(useLabelForInfoPopup ? lbl : bar, bar); } }