
- 积分
- 4833
- 在线时间
- 1522 小时
- 主题
- 7
- 注册时间
- 2016-12-24
- 帖子
- 165
- 最后登录
- 2025-2-23

- 帖子
- 165
- 软币
- 11887
- 在线时间
- 1522 小时
- 注册时间
- 2016-12-24
|
本帖最后由 sxcpwzdy 于 2019-9-30 09:02 编辑
dev控件,gridcontrol控件默认空白区域是空的,以下源代码为控件空白区域画风格线。
不同的皮肤可能会出现偏差,测试vs2019以后新增的皮肤,本实例以dev18.2为例,如果需要可调整下段代码:
int minRowHeight = e.ViewInfo.View.RowHeight + 1;// .MinRowHeight;
if (e.ViewInfo.View.RowHeight == -1)
{
minRowHeight = e.ViewInfo.MinRowHeight + 1;
}
if (base.View.OptionsView.ShowHorzLines)
{
for (int i = top; i <= bottom; i += minRowHeight)
{
e.Graphics.DrawLine(pen, left, i - 1, right, i - 1);
}
}
|
评分
-
查看全部评分
|