* UIComboBox: 增加下拉界面的滚动条设置

This commit is contained in:
Sunny 2023-12-26 21:27:04 +08:00
parent b5bbc3e5d9
commit 90fcb70cb0

View File

@ -38,6 +38,7 @@
* 2023-06-28: V3.3.9 * 2023-06-28: V3.3.9
* 2023-07-03: V3.3.9 * 2023-07-03: V3.3.9
* 2023-08-11: V3.4.1 Items.Clear后DropDownStyle为DropDown时Text * 2023-08-11: V3.4.1 Items.Clear后DropDownStyle为DropDown时Text
* 2023-12-26: V3.6.2
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -80,6 +81,52 @@ namespace Sunny.UI
CreateInstance(); CreateInstance();
} }
[DefaultValue(0), Category("SunnyUI"), Description("垂直滚动条宽度,最小为原生滚动条宽度")]
public int ScrollBarWidth
{
get => ListBox.ScrollBarWidth;
set => ListBox.ScrollBarWidth = value;
}
[DefaultValue(6), Category("SunnyUI"), Description("垂直滚动条滑块宽度,最小为原生滚动条宽度")]
public int ScrollBarHandleWidth
{
get => ListBox.ScrollBarHandleWidth;
set => ListBox.ScrollBarHandleWidth = value;
}
/// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary>
[Description("滚动条填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")]
public Color ScrollBarColor
{
get => ListBox.ScrollBarColor;
set => ListBox.ScrollBarColor = value;
}
/// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary>
[Description("滚动条背景颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "243, 249, 255")]
public Color ScrollBarBackColor
{
get => ListBox.ScrollBarBackColor;
set => ListBox.ScrollBarBackColor = value;
}
/// <summary>
/// 滚动条主题样式
/// </summary>
[DefaultValue(true), Description("滚动条主题样式"), Category("SunnyUI")]
public bool ScrollBarStyleInherited
{
get => ListBox.ScrollBarStyleInherited;
set => ListBox.ScrollBarStyleInherited = value;
}
[DefaultValue(false)] [DefaultValue(false)]
[Description("显示清除按钮"), Category("SunnyUI")] [Description("显示清除按钮"), Category("SunnyUI")]
public bool ShowClearButton public bool ShowClearButton