Exemplo n.º 1
0
        /// <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;
            }
        }
Exemplo n.º 2
0
        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
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
		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);
		}
Exemplo n.º 5
0
        /// <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;
        }
Exemplo n.º 6
0
        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;
        }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
        /// <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;
        }
Exemplo n.º 10
0
        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;
        }
Exemplo n.º 11
0
        /// <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;
             }
        }
Exemplo n.º 12
0
        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
        }