/// <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(this.Bounds); } if (!_TT.Active && !string.IsNullOrEmpty(this.ToolTip)) // ToolTip should be working without title as well - to get Office 2007 Look & Feel { DeactivateToolTip(_lastActiveToolTip); if (this.ToolTip != _TT.GetToolTip(this.Canvas)) { _TT.SetToolTip(this.Canvas, this.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 += new PopupEventHandler(_TT_Popup); }
/// <summary> /// Raises the MouseLeave event /// </summary> /// <param name="e">Event data</param> public virtual void OnMouseLeave(MouseEventArgs e) { if (!Enabled) { return; } if (MouseLeave != null) { MouseLeave(this, e); } _TT.Active = false; _TT = null; }
public RibbonTab() { Panels = new RibbonPanelCollection(this); _enabled = true; //Initialize the ToolTip for this Item _TT = new RibbonToolTip(this) { InitialDelay = 100, AutomaticDelay = 800, AutoPopDelay = 8000, UseAnimation = true, Active = false }; _TT.Popup += _TT_Popup; }
public RibbonItem() { _enabled = true; _visible = true; Click += new EventHandler(RibbonItem_Click); _flashTimer.Tick += new EventHandler(_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 += new PopupEventHandler(_TT_Popup); }
/// <summary> /// Raises the MouseEnter event /// </summary> /// <param name="e">Event data</param> public virtual void OnMouseEnter(MouseEventArgs e) { if (MouseEnter != null) { MouseEnter(this, e); } //Initialize the ToolTip for this Item _TT = new RibbonToolTip(_owner); _TT.InitialDelay = 100; _TT.AutomaticDelay = 800; _TT.AutoPopDelay = 8000; _TT.UseAnimation = true; _TT.Active = false; _TT.ToolTipTitle = this.ToolTipTitle; _TT.ToolTipImage = this.ToolTipImage; }
public RibbonItem() { _enabled = true; _visible = true; Click += RibbonItem_Click; _flashTimer.Tick += _flashTimer_Tick; //Initialize the ToolTip for this Item _TT = new RibbonToolTip(this) { InitialDelay = 100, AutomaticDelay = 800, AutoPopDelay = 8000, UseAnimation = true, Active = false }; _TT.Popup += _TT_Popup; }
/// <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(this.Bounds); } if (!_TT.Active && !string.IsNullOrEmpty(this.ToolTip)) // ToolTip should be working without title as well - to get Office 2007 Look & Feel { DeactivateToolTip(_lastActiveToolTip); if (this.ToolTip != _TT.GetToolTip(this.Canvas)) { _TT.SetToolTip(this.Canvas, this.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 }