Пример #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
            {
                if (this.ToolTip != _TT.GetToolTip(this.Owner))
                {
                    _TT.SetToolTip(this.Owner, this.ToolTip);
                }
                _TT.Active = true;
            }
        }
Пример #2
0
 /// <summary>
 /// Raises the MouseMove event
 /// </summary>
 /// <param name="e">Event data</param>
 public virtual void OnMouseMove(MouseEventArgs e)
 {
     if (MouseMove != null)
     {
         MouseMove(this, e);
     }
     if (!_TT.Active && !string.IsNullOrEmpty(this.ToolTip)) // ToolTip should be working without title as well - to get Office 2007 Look & Feel
     {
         if (this.ToolTip != _TT.GetToolTip(this.Owner))
         {
             _TT.SetToolTip(this.Owner, this.ToolTip);
         }
         _TT.Active = true;
     }
 }
Пример #3
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 != null)
            {
                if (!_TT.Active && this.ToolTip != null && this.ToolTipTitle != null && this.ToolTip != string.Empty && this.ToolTipTitle != string.Empty)
                {
                    _TT.ToolTipTitle = this.ToolTipTitle;
                    _TT.ToolTipIcon  = this.ToolTipIcon;
                    _TT.SetToolTip(this.Owner, this.ToolTip);
                    _TT.Active = true;
                }
            }
        }
Пример #4
0
 /// <summary>
 /// Raises the MouseMove event
 /// </summary>
 /// <param name="e">Event data</param>
 public virtual void OnMouseMove(MouseEventArgs e)
 {
     if (MouseMove != null)
     {
         MouseMove(this, e);
     }
     if (!_TT.Active && this.ToolTip != null && this.ToolTipTitle != null && this.ToolTip != string.Empty && this.ToolTipTitle != string.Empty)
     {
         _TT.ToolTipTitle = this.ToolTipTitle;
         _TT.ToolTipIcon  = this.ToolTipIcon;
         _TT.SetToolTip(this.Owner, this.ToolTip);
         _TT.Active = true;
     }
 }