Ejemplo n.º 1
0
 protected virtual void InitializeInternalControls()
 {
     this.container = this.CreateScrollablePanelContainer();
     this.container.ScrollBarSynchronizationNeeded += new ScrollbarSynchronizationNeededEventHandler(this.OnContainer_ScrolledToControl);
     this.container.Dock                    = DockStyle.Fill;
     this.container.AutoScroll              = true;
     this.verticalScrollbar                 = new RadVScrollBar();
     this.verticalScrollbar.Focusable       = false;
     this.verticalScrollbar.Dock            = DockStyle.Right;
     this.verticalScrollbar.ValueChanged   += new EventHandler(this.verticalScrollbar_ValueChanged);
     this.verticalScrollbar.Visible         = false;
     this.horizontalScrollbar               = new RadHScrollBar();
     this.horizontalScrollbar.Focusable     = false;
     this.horizontalScrollbar.Dock          = DockStyle.Bottom;
     this.horizontalScrollbar.ValueChanged += new EventHandler(this.horizontalScrollbar_ValueChanged);
     this.horizontalScrollbar.Visible       = false;
     this.container.MouseWheel             += new MouseEventHandler(this.OnInternalContainer_MouseWheel);
     this.InsertInternalControls();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// This method initializes the scrollbars and the
        /// container control.
        /// </summary>
        protected virtual void InitializeInternalControls()
        {
            this.container = new RadScrollablePanelContainer(this);
            this.container.ScrollBarSynchronizationNeeded += new ScrollbarSynchronizationNeededEventHandler(OnContainer_ScrolledToControl);
            this.container.Dock = System.Windows.Forms.DockStyle.Fill;

            this.verticalScrollbar = new RadVScrollBar();

            this.verticalScrollbar.Dock    = System.Windows.Forms.DockStyle.Right;
            this.verticalScrollbar.Scroll += new ScrollEventHandler(OnVerticalScrollbar_Scroll);


            this.horizontalScrollbar         = new RadHScrollBar();
            this.horizontalScrollbar.Dock    = DockStyle.Bottom;
            this.horizontalScrollbar.Scroll += new ScrollEventHandler(OnHorizontalScrollbar_Scroll);

            this.container.MouseWheel += new MouseEventHandler(OnInternalContainer_MouseWheel);

            this.InsertInternalControls();
            this.horizontalScrollbar.Visible = false;
            this.verticalScrollbar.Visible   = false;
        }