自己开发基于C#的垂直滚动条控件
作者:网络转载 发布时间:[ 2015/4/27 13:31:52 ] 推荐标签:C# 控件 滚动条
例如:
在属性浏览器中设置:

设计器自动生成如下代码:
在Form类中:
private MyControlLibrary.ScrollBar TextScrollBar;
在InitializeComponent()中:
this.TextScrollBar.BackColor = System.Drawing.Color.White;
this.TextScrollBar.EnterColor = System.Drawing.SystemColors.ControlDark;
this.TextScrollBar.Location = new System.Drawing.Point(664, 44);
this.TextScrollBar.MinSlideBarLenght = 30;
this.TextScrollBar.Name = "TextScrollBar";
this.TextScrollBar.PressedColor = System.Drawing.SystemColors.ControlDarkDark;
this.TextScrollBar.Size = new System.Drawing.Size(10, 323);
this.TextScrollBar.TabIndex = 18;
this.TextScrollBar.TextBox = this.TextBox_Receive;
this.TextScrollBar.WakedColor = System.Drawing.SystemColors.ControlLight;
效果图:


sales@spasvo.com