ComponentFactory.Krypton.Ribbon.RibbonTabController.MouseDown C# (CSharp) Method

MouseDown() public method

Mouse button has been pressed in the view.
public MouseDown ( Control c, Point pt, MouseButtons button ) : bool
c System.Windows.Forms.Control Reference to the source control instance.
pt Point Mouse position relative to control.
button MouseButtons Mouse button pressed down.
return bool
        public virtual bool MouseDown(Control c, Point pt, MouseButtons button)
        {
            if (Active)
            {
                // Only interested in left mouse pressing down
                if (button == MouseButtons.Left)
                {
                    // Can only click if enabled
                    if (_target.Enabled)
                    {
                        // Generate a click event
                        OnClick(new MouseEventArgs(MouseButtons.Left, 1, pt.X, pt.Y, 0));
                    }

                    // Update the visual state
                    UpdateTargetState(c);
                }
                else if (button == MouseButtons.Right)
                {
                    // Remember the user has pressed the right mouse button down
                    _rightButtonDown = true;
                }
            }

            return false;
        }