ComponentFactory.Krypton.Ribbon.ViewLayoutRibbonScroller.ViewLayoutRibbonScroller C# (CSharp) Méthode

ViewLayoutRibbonScroller() public méthode

Initialize a new instance of the ViewLayoutRibbonScroller class.
public ViewLayoutRibbonScroller ( KryptonRibbon ribbon, VisualOrientation orientation, bool insetForTabs, NeedPaintHandler needPaintDelegate ) : System
ribbon KryptonRibbon Reference to owning ribbon control.
orientation VisualOrientation Scroller orientation.
insetForTabs bool Should scoller be inset for use in tabs area.
needPaintDelegate NeedPaintHandler Delegate for notifying paint/layout requests.
Résultat System
        public ViewLayoutRibbonScroller(KryptonRibbon ribbon,
                                        VisualOrientation orientation,
                                        bool insetForTabs,
                                        NeedPaintHandler needPaintDelegate)
        {
            // Cache provided values
            _orientation = orientation;
            _insetForTabs = insetForTabs;

            // Create the button and the separator
            _button = new ViewDrawRibbonScrollButton(ribbon, orientation);
            _separator = new ViewLayoutRibbonSeparator(GAP_LENGTH, true);

            // Create button controller for clicking the button
            RepeatButtonController rbc = new RepeatButtonController(ribbon, _button, needPaintDelegate);
            rbc.Click += new MouseEventHandler(OnButtonClick);
            _button.MouseController = rbc;

            // Add as child elements
            Add(_button);
            Add(_separator);
        }