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(); }
public override ControlStyleBuilderInfoList GetThemeDesignedControls(Control previewSurface) { RadHScrollBar scrollBarPreview = new RadHScrollBar(); scrollBarPreview.Value = 50; scrollBarPreview.ThemeName = ""; scrollBarPreview.Bounds = new Rectangle(0, 0, 200, 20); RadHScrollBar scrollBarStructure = new RadHScrollBar(); scrollBarStructure.Bounds = new Rectangle(0, 0, 200, 20); ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(scrollBarPreview, scrollBarStructure.RootElement); designed.MainElementClassName = typeof(RadScrollBarElement).FullName; ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList(); res.Add(designed); return(res); }
/// <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; }