自己开发基于C#的垂直滚动条控件

发表于:2015-4-27 09:57

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:Elegies    来源:51Testing软件测试网采编

  由于Visual Studio工具箱中自带滚动条控件外观太老,而且没有颜色外观属性可设置。 所以自己就试着开发一个垂直的滚动条,它可以用来控制TextBox的滚动。
  由于代码比较多,源文件已经打包到网盘,链接:http://pan.baidu.com/s/1dDtn8sD
  Release目录下生成的dll可以添加至工具箱
  使用时需要设置的属性:
#region 滑动条最短长度
[System.ComponentModel.Browsable(true)]
[Localizable(true)]
[System.ComponentModel.Category("Appearance")]
[System.ComponentModel.DefaultValue(null)]
[System.ComponentModel.Description("滑动条最短长度")]
public int MinSlideBarLenght{get; set;}
#endregion
#region  要滑动的TextBox
[System.ComponentModel.Browsable(true)]
[Localizable(true)]
[System.ComponentModel.Category("Appearance")]
[System.ComponentModel.DefaultValue(null)]
[System.ComponentModel.Description("要滚动的TextBox")]
public TextBox TextBox{get; set;}
#endregion
#region 滑动条被唤醒颜色
[System.ComponentModel.Browsable(true)]
[Localizable(true)]
[System.ComponentModel.Category("Appearance")]
[System.ComponentModel.Description("滑动条被唤醒的颜色")]
[System.ComponentModel.DefaultValue(null)]
public Color WakedColor{get; set;}
#endregion
#region 滑动条被按下颜色
[System.ComponentModel.Browsable(true)]
[Localizable(true)]
[System.ComponentModel.Category("Appearance")]
[System.ComponentModel.DefaultValue(null)]
[System.ComponentModel.Description("滑动条被按下的颜色")]
public Color PressedColor{get;set;}
#endregion
#region 鼠标进入滑动条颜色
[System.ComponentModel.Browsable(true)]
[Localizable(true)]
[System.ComponentModel.Category("Appearance")]
[System.ComponentModel.DefaultValue(null)]
[System.ComponentModel.Description("鼠标进入滑动条的颜色")]
public Color EnterColor {get; set;}
#endregion
21/212>
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号