怎样改变某行某列的背景色

viviehsiao 2009-01-09 11:59:00
dw_1.Modify("unit_price.Background.Color='If(GetRow()=i,rgb(255,0,0),rgb(255,255,255))'")

请教各位大侠,以上有会么不对呢
...全文
129 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Divina 2009-01-09
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 sdhylj 的回复:]
dw_1.Modify("unit_price.background.color = '11665407 ~tif(getrow()="+string(row)+",rgb(0,255,0),rgb(255,255,255))'")
[/Quote]

顶楼上的。

后面那俩RGB函数可以换成PB自己的颜色表示。

viviehsiao 2009-01-09
  • 打赏
  • 举报
回复
就是说我只要判断第i行unit_price的背景色, 其它行的不变
viviehsiao 2009-01-09
  • 打赏
  • 举报
回复
谢谢sdhylj
dw_1.Modify("unit_price.background.color = '11665407 ~t if(getrow()=" + string(i) + ",rgb(0,255,0),rgb(255,255,255))'")
这个正确了

只能改变一行的unit_price要改变背景色, 多行就不行, 怎么改啊
青锋-SS 2009-01-09
  • 打赏
  • 举报
回复
dw_1.Modify("unit_price.background.color = '11665407 ~t if(getrow()=" + string(i) + ",rgb(0,255,0),rgb(255,255,255))'")
青锋-SS 2009-01-09
  • 打赏
  • 举报
回复
dw_1.Modify("unit_price.background.color = '11665407 ~t if(getrow()=" + string(i) + ",rgb(0,255,0),rgb(255,255,255))'")

740

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 脚本语言
社区管理员
  • 脚本语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧