/// <summary> /// Raises the MouseMove event /// </summary> /// <param name="e">Event data</param> public virtual void OnMouseMove(MouseEventArgs e) { if (!Enabled) return; if (MouseMove != null) { MouseMove(this, e); } //Kevin - found cases where mousing into buttons doesn't set the selection. This arose with the office 2010 style if (!Selected) { SetSelected(true); Owner.Invalidate(Bounds); } if (!_TT.Active && !string.IsNullOrEmpty(ToolTip)) // ToolTip should be working without title as well - to get Office 2007 Look & Feel { DeactivateToolTip(_lastActiveToolTip); if (ToolTip != _TT.GetToolTip(Canvas)) { _TT.SetToolTip(Canvas, ToolTip); } _TT.Active = true; _lastActiveToolTip = null; _lastActiveToolTip = _TT; } }
private void DeactivateToolTip(RibbonToolTip toolTip) { if (toolTip == null) return; toolTip.Active = false; toolTip.RemoveAll(); // this is needed otherwise a tooltip within a dropdown is not shown again if the item is clicked }
public RibbonTab() { _panels = new RibbonPanelCollection(this); //Initialize the ToolTip for this Item _TT = new RibbonToolTip(this); _TT.InitialDelay = 100; _TT.AutomaticDelay = 800; _TT.AutoPopDelay = 8000; _TT.UseAnimation = true; _TT.Active = false; _TT.Popup += _TT_Popup; }
public RibbonItem() { _enabled = true; _visible = true; Click += RibbonItem_Click; _flashTimer.Tick += _flashTimer_Tick; //Initialize the ToolTip for this Item _TT = new RibbonToolTip(this); _TT.InitialDelay = 100; _TT.AutomaticDelay = 800; _TT.AutoPopDelay = 8000; _TT.UseAnimation = true; _TT.Active = false; _TT.Popup += _TT_Popup; }