阅读:18538回复:6
4gl单身行按条件显示不同的颜色!----我不是原创
一、单身颜色:
1.首先MAIN函数之前定义一个数组(这个数组名称最好与单身主数组一致只在后面加个_Color,里面的栏位名称与单身主数组保持一致) 例如: DEFINE g_oeb_color DYNAMIC ARRAY OF RECORD c01 STRING,c02 STRING, c03 STRING,c04 STRING, c05 STRING,c06 STRING, c07 STRING,c08 STRING, c09 STRING,c10 STRING, c11 STRING,c12 STRING END RECORD 2._bp(p_ud) 函数里面: ##setCellAttributes( attarr ARRAY OF RECORD ) ##Defines decoration attributes for each cell. (定义每个单元格的属性) BEFORE DISPLAY ##显示之前设置属性 CALL DIALOG.setCellAttributes(g_oeb_color) 3._fill函数里面 首先 CALL g_oeb_color.clear() #清空 然后 FOREACH 里面 判断并赋值(可以对多个栏位,也可以是某一个栏位) IF g_ta_gja[g_cnt].tc_gja10 >5 AND g_ta_gja[g_cnt].tc_gja10<10 THEN LET g_oeb_color[g_cnt].c01 ="" LET g_oeb_color[g_cnt].c02 ="" LET g_oeb_color[g_cnt].c03 ="" LET g_oeb_color[g_cnt].c04 ="" LET g_oeb_color[g_cnt].c05 ="" LET g_oeb_color[g_cnt].c06 ="" LET g_oeb_color[g_cnt].c07 ="" LET g_oeb_color[g_cnt].c08 ="" LET g_oeb_color[g_cnt].c09 ="" LET g_oeb_color[g_cnt].c10 ="red" LET g_oeb_color[g_cnt].c11 ="" LET g_oeb_color[g_cnt].c12 ="" ELSE IF g_ta_gja[g_cnt].tc_gja10>10 THEN LET g_oeb_color[g_cnt].c01 ="" LET g_oeb_color[g_cnt].c02 ="" LET g_oeb_color[g_cnt].c03 ="" LET g_oeb_color[g_cnt].c04 ="" LET g_oeb_color[g_cnt].c05 ="" LET g_oeb_color[g_cnt].c06 ="" LET g_oeb_color[g_cnt].c07 ="" LET g_oeb_color[g_cnt].c08 ="" LET g_oeb_color[g_cnt].c09 ="" LET g_oeb_color[g_cnt].c10 ="blue" LET g_oeb_color[g_cnt].c11 ="" LET g_oeb_color[g_cnt].c12 ="" ELSE LET g_oeb_color[g_cnt].c01 ="" LET g_oeb_color[g_cnt].c02 ="" LET g_oeb_color[g_cnt].c03 ="" LET g_oeb_color[g_cnt].c04 ="" LET g_oeb_color[g_cnt].c05 ="" LET g_oeb_color[g_cnt].c06 ="" LET g_oeb_color[g_cnt].c07 ="" LET g_oeb_color[g_cnt].c08 ="" LET g_oeb_color[g_cnt].c09 ="" LET g_oeb_color[g_cnt].c10 ="green blod" LET g_oeb_color[g_cnt].c11 ="" LET g_oeb_color[g_cnt].c12 ="" END IF END IF |
|
最新喜欢:sara_m... |
沙发#
发布于:2016-12-12 16:01
用这个发现有的栏位填充变色有的不变色,不晓得是啥情况了,求高手相助啊
图片:$YPI~6WE[817@`$VU_{4_BH.png |
|
板凳#
发布于:2017-11-20 15:05
请教下,我测试了下,上传的时候会报错,然后好像又有上传,但是程序打不开,报错如下:
[0051][05:24:54] ERROR(-1337):The variable g_setting has been redefined with a different type or length, definition in aps_apsp300_04.4gl, redefinition in asf_asfp301_02.4gl. [0052][05:24:54] [0053][05:24:54] ERROR : Link error. |
|
|
地板#
发布于:2018-04-03 14:37
|
|
4楼#
发布于:2018-06-25 11:33
学习学习
|
|
5楼#
发布于:2018-08-07 15:21
学习学习
|
|
6楼#
发布于:2019-03-28 15:12
学习学习
|
|