10.12.OrangeUI控件使用说明(列表框控件ListBox)(示例12 头尾分隔线的设置)

 

ListBox添加头分隔线,也就是第一个列表项顶部的线,

只要把SelfOwnMaterial.DrawGroupBeginDevideParam.IsFill设置为True就可以了,

ListBox添加尾分隔线,也就是最后一个列表项底部的线,

只要把SelfOwnMaterial.DrawGroupEndDevideParam.IsFill设置为True就可以了,

效果如下:

默认情况下,ListBox.SelfOwnMaterial.IsSimpleDrawGroupBeginDevide为True,

ListBox.SelfOwnMaterial.IsSimpleDrawGroupEndDevide为True,

它表示使用简单常用的头尾分隔线,即宽度1个像素的细线,

所以如果要自定义ListBox头尾分隔线的宽度,

那就要先把SelfOwnMaterial.IsSimpleDrawGroupBeginDevide设置为False,

SelfOwnMaterial.IsSimpleDrawGroupEndDevide设置为False,

效果如下:

因为IsSimpleDrawGroupBeginDevide和IsSimpleDrawGroupEndDevide为False了之后,

DrawGroupBeginDevideParam和DrawGroupEndDevideParam会画在整个列表项上面,

这样,整个列表项都被分隔线盖住了,

所以,还需要指定头尾分隔线绘制参数的高度,

 

把DrawGroupBeginDevideParam.DrawEffectSetting.Enabled设置为True,

DrawGroupBeginDevideParam.DrawEffectSetting.Height设置为2,

DrawGroupBeginDevideParam.DrawEffectSetting.PositionVertType设置为dppvtTop,

DrawGroupBeginDevideParam.DrawEffectSetting.SizeType设置为dpstPixel,

 

把DrawGroupEndDevideParam.DrawEffectSetting.Enabled设置为True,

DrawGroupEndDevideParam.DrawEffectSetting.Height设置为2,

DrawGroupEndDevideParam.DrawEffectSetting.PositionVertType设置为dppvtBottom,

DrawGroupEndDevideParam.DrawEffectSetting.SizeType设置为dpstPixel,

 

效果如下:

再设置一致的分隔线颜色:

DrawGroupBeginDevideParam.FillColor.Color设置为#80808080,

DrawGroupEndDevideParam.FillColor.Color设置为#80808080,

 

 

 

 

 

 

 

发表评论