Esempio n. 1
0
 public RichTextBoxScroll() : base()
 {
     TextBox   = new RichTextBoxBack();
     ScrollBar = new VScrollBarCustom();
     Controls.Add(TextBox);
     Controls.Add(ScrollBar);
     TextBox.ScrollBars  = RichTextBoxScrollBars.None;
     TextBox.BorderStyle = BorderStyle.None;
     TextBox.BackColor   = BackColor;
     TextBox.ForeColor   = ForeColor;
     TextBox.Show();
     ScrollBar.Show();
     TextBox.VScroll     += OnVscrollChanged;
     TextBox.MouseWheel  += new MouseEventHandler(MWheel);       // richtextbox without scroll bars do not handle mouse wheels
     TextBox.TextChanged += TextChangeEventHandler;
     ScrollBar.Scroll    += new System.Windows.Forms.ScrollEventHandler(OnScrollBarChanged);
 }