ComponentFactory.Krypton.Ribbon.ViewDrawRibbonQATExtraButton.ViewDrawRibbonQATExtraButton C# (CSharp) Method

ViewDrawRibbonQATExtraButton() public method

Initialize a new instance of the ViewDrawRibbonQATExtraButton class.
public ViewDrawRibbonQATExtraButton ( KryptonRibbon ribbon, NeedPaintHandler needPaint ) : System
ribbon KryptonRibbon Reference to owning ribbon control.
needPaint NeedPaintHandler Delegate for notifying paint requests.
return System
        public ViewDrawRibbonQATExtraButton(KryptonRibbon ribbon,
                                            NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);

            // Remember incoming references
            _ribbon = ribbon;

            // Create delegate used to process end of click action
            _finishDelegate = new EventHandler(ClickFinished);

            // Attach a controller to this element for the pressing of the button
            QATExtraButtonController controller = new QATExtraButtonController(ribbon, this, needPaint);
            controller.Click += new MouseEventHandler(OnClick);
            MouseController = controller;
            SourceController = controller;
            KeyController = controller;
        }