ComponentFactory.Krypton.Ribbon.ViewLayoutRibbonQATMini.OnExtraButtonClick C# (CSharp) Method

OnExtraButtonClick() private method

private OnExtraButtonClick ( object sender, EventHandler finishDelegate ) : void
sender object
finishDelegate EventHandler
return void
        private void OnExtraButtonClick(object sender, EventHandler finishDelegate)
        {
            ViewDrawRibbonQATExtraButton button = (ViewDrawRibbonQATExtraButton)sender;

            // Convert the button rectangle to screen coordinates
            Rectangle screenRect = _ribbon.RectangleToScreen(button.ClientRectangle);

            // If integrated into the caption area
            if ((OwnerForm != null) && !OwnerForm.ApplyComposition)
            {
                // Adjust for the height/width of borders
                Padding borders = OwnerForm.RealWindowBorders;
                screenRect.X -= borders.Left;
                screenRect.Y -= borders.Top;
            }

            if (_extraButton.Overflow)
                _ribbon.DisplayQATOverflowMenu(screenRect, _borderContents, finishDelegate);
            else
                _ribbon.DisplayQATCustomizeMenu(screenRect, _borderContents, finishDelegate);
        }