Пример #1
0
        // Create the scrollBars but dont add them to the control, just parent them using the toolkit.
        private void CreateScrollBars()
        {
            DestroyScrollBars();                     // delete the "old" if we had some.

            hScrollBar         = new HScrollBar();
            hScrollBar.Scroll += new ScrollEventHandler(HandleScroll);
            hScrollBar.CreateControl();
            hScrollBar.toolkitWindow.Reparent(toolkitWindow, 0, 0);
            hScrollBar.toolkitWindow.Raise();

            vScrollBar         = new VScrollBar();
            vScrollBar.Scroll += new ScrollEventHandler(HandleScroll);
            vScrollBar.CreateControl();
            vScrollBar.toolkitWindow.Reparent(toolkitWindow, 0, 0);
            vScrollBar.toolkitWindow.Raise();

            UpdateScrollBars();
        }
	// Create the scrollBars but dont add them to the control, just parent them using the toolkit.
	private void CreateScrollBars()
			{
				hScrollBar=new HScrollBar();	
				hScrollBar.Scroll+=new ScrollEventHandler(HandleScroll);
				hScrollBar.CreateControl();
				hScrollBar.toolkitWindow.Reparent(toolkitWindow, 0, 0);
				hScrollBar.toolkitWindow.Raise();

				vScrollBar=new VScrollBar();
				vScrollBar.Scroll+=new ScrollEventHandler(HandleScroll);
				vScrollBar.CreateControl();
				vScrollBar.toolkitWindow.Reparent(toolkitWindow, 0, 0);
				vScrollBar.toolkitWindow.Raise();
				UpdateScrollBars();
			}