以文本方式查看主题
- Foxtable(狐表) (http://foxtable.com/bbs/index.asp)
-- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2)
---- 指定进度单元格之后的列均有颜色显示? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=113429)
|
-- 作者:wukai196
-- 发布时间:2018/1/15 22:34:00
-- 指定进度单元格之后的列均有颜色显示?
依样画葫,代码如下:
If e.Col.Name = "工序1_实际_数量" AndAlso e.Row.IsNull("工序1_实际_数量") = False Then e.StartDraw() Dim Width As Integer = (e.Width - 2 )* e.Row("工序1_实际_数量") If e.Row("工序1_实际_数量") = e.Row("投产数量") Then e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2) Else e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2) End If e.EndDraw() End If
为什么除“实际数量”列有颜色显示,后面的列均有颜色显示,仅“实际数量”列显示怎么破?
|
-- 作者:有点蓝
-- 发布时间:2018/1/15 22:42:00
--
If e.Col.Name = "工序1_实际_数量" If e.Row.IsNull("工序1_实际_数量") = False Then e.StartDraw() Dim Width As Integer = (e.Width - 2 )* e.Row("工序1_实际_数量") If e.Row("工序1_实际_数量") = e.Row("投产数量") Then e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2) Else e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2) End If e.EndDraw() End If End If
|
-- 作者:wukai196
-- 发布时间:2018/1/15 22:50:00
-- 进度条颜色全部填充
此主题相关图片如下:捕获1.png

还是一样,发现是鼠标移到后面列单元格位置,该单元格的颜色就会填充进去或者未填充,点击整行其后单元格颜色全部填充。
|
-- 作者:有点蓝
-- 发布时间:2018/1/15 22:57:00
--
If e.Col.Name = "工序1_实际_数量" If val(e.Row("投产数量")) > 0 Then e.StartDraw() Dim Width As Integer = (e.Width - 2 ) * (val(e.Row("工序1_实际_数量")) \\ val(e.Row("投产数量"))) If e.Row("工序1_实际_数量") = e.Row("投产数量") Then e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2) Else e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2) End If e.EndDraw() End If End If
|
-- 作者:wukai196
-- 发布时间:2018/1/15 23:05:00
-- 表的标题层为多层,但标题显示为多层拆分结构?
此主题相关图片如下:捕获.jpg

未达到数量的未显示底色, 需要未达数量的显示红色进度条,达到后才会显示绿色。
|
-- 作者:有点蓝
-- 发布时间:2018/1/16 8:42:00
--
If e.Col.Name = "工序1_实际_数量" If val(e.Row("投产数量")) > 0 Then e.StartDraw() Dim Width As Integer = (e.Width - 2 ) * val(e.Row("工序1_实际_数量")) \\ val(e.Row("投产数量")) If e.Row("工序1_实际_数量") = e.Row("投产数量") Then e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2) Else e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2) End If e.EndDraw() End If End If
|
-- 作者:wukai196
-- 发布时间:2018/1/16 21:30:00
-- 表的标题层为多层,但标题显示为多层拆分结构?
OL,可以了 !
|