博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
code
阅读量:2495 次
发布时间:2019-05-11

本文共 2682 字,大约阅读时间需要 8 分钟。

if row > 0 then this.selectrow(0,false) end if[@more@]//====================================================================== //功 能:改变datawindwo数据行的颜色 // //参 数:datawindow adw_data//需要修改颜色的datawindow // //返回值:integer 1,成功 0,失败 //====================================================================== string ls_col string ls_modify string ls_des string ls_exp1 string ls_exp2 string ls_exp3 string ls_color1 string ls_color2 string ls_color3 string ls_color4 string ls_color5 integer li_colcount integer i string ls_enable integer li_pos1 integer li_pos2 // ls_color1 = "RGB(61,99,53)"//"rgb(255,247,198)" ls_color2 = "RGB(230,255,242)" ls_color3 = "RGB(255,255,255)" ls_color4 = "RGB(0,0,0)" ls_color5 = "RGB(128,128,128)" //数据行背景色 ls_exp1 = string(RGB(255,255,255)) + "~tif (getrow() = currentrow(),"& +ls_color1+", if( mod(getrow(),2)=0,"+ls_color2+","+ls_color3+"))" //数据行文字色 ls_exp2 = string(RGB(255,255,255)) + "~tif (getrow() = currentrow(),"+ls_color3+","+ls_color4+")" //无效数据文本色if( enable = "N" ,rgb(128,128,128), rgb(0,0,0) ) ls_exp3 = string(RGB(0,0,0)) + "~tif (getrow() = currentrow(),"& +ls_color3+",if (" li_colcount = integer(adw_data.describe("DataWindow.Column.Count")) //修改数据行的颜色 for i = 1 to li_colcount ls_col = adw_data.Describe("#"+string(i)+".Name") //修改数据行前景背景色 ls_modify = ls_col + ".Background.Color = '" + ls_exp1 + "'" adw_data.modify(ls_modify) ls_des = upper(adw_data.describe(ls_col+".Color")) if (pos(ls_des,'ENABLE') >0 or pos(ls_des,'C_ENABLE') >0 ) and pos(ls_des,'RGB(128,128,128)') > 0 then //取开始 li_pos1 = pos(ls_des,'(') + 1 //取结束 li_pos2 = pos(ls_des,'=') - 1 ls_enable = mid(ls_des,li_pos1,li_pos2 - li_pos1)+ "= ~"N~","+ls_color5+","+ls_color4+"))" ls_modify = ls_col+".Color = '" + ls_exp3 + ls_enable + "'" else ls_modify = ls_col + ".Color = '" + ls_exp2 + "'" end if adw_data.modify(ls_modify) //修改列名的背景色前景色 ls_modify = ls_col + "_t.Background.Color = '" + string(rgb(230,230,230)) + "'" adw_data.modify(ls_modify) ls_modify = ls_col + "_t.Color = '" + string(RGB(0,0,0)) +"'" adw_data.modify(ls_modify) next //修改所有文本框颜色 for i = 1 to li_colcount*2 ls_col = "t_" + string(i) ls_des = upper(adw_data.describe(ls_col+".Background.Color")) //能够正确得到其属性值 if ls_des '!' then //修改数据行下面的文本框背景色 if pos(ls_des,'IF') > 0 then ls_modify = ls_col + ".Background.Color = '" + ls_exp1 + "'" adw_data.modify(ls_modify) end if //修改列名下面的文本框 if pos(ls_des,'RGB(207,221,240)') > 0 then ls_modify = ls_col + ".Background.Color = '" + string(rgb(230,230,230)) + "'" adw_data.modify(ls_modify) end if end if next return 1

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/219138/viewspace-917904/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/219138/viewspace-917904/

你可能感兴趣的文章
大数据学习之HDP SANDBOX开始学习
查看>>
Hive Beeline使用
查看>>
Centos6安装图形界面(hdp不需要,hdp直接从github上下载数据即可)
查看>>
CentOS7 中把yum源更换成163源
查看>>
关于yum Error: Cannot retrieve repository metadata (repomd.xml) for repository:xxxxxx.
查看>>
linux下载github中的文件
查看>>
HDP Sandbox里面git clone不了数据(HTTP request failed)【目前还没解决,所以hive的练习先暂时搁置了】
查看>>
动态分区最佳实践(一定要注意实践场景)
查看>>
HIVE—索引、分区和分桶的区别
查看>>
Hive进阶总结(听课总结)
查看>>
大数据领域两大最主流集群管理工具Ambari和Cloudera Manger
查看>>
Sqoop往Hive导入数据实战
查看>>
Mysql到HBase的迁移
查看>>
Sqoop import进阶
查看>>
Hive语句是如何转化成MapReduce任务的
查看>>
Hive创建table报错:Permission denied: user=lenovo, access=WRITE, inode="":suh:supergroup:rwxr-xr-x
查看>>
Hive执行job时return code 2排查
查看>>
hive常用函数及数据结构介绍
查看>>
Hive面试题干货(亲自跟着做了好几遍,会了的话对面试大有好处)
查看>>
力扣题解-230. 二叉搜索树中第K小的元素(递归方法,中序遍历解决)
查看>>