GRID颜色问题!
我想实现,当开奖号为对子的时候,字段零到九,相应的数字变成红色,请教怎么实现
如图:155,把字段五,当中的⑤变成红色
232,把字段二,当中的②变成红色,以此类推
是针对行,不是列
程序代码:
FOR i=1 TO FCOUNT() zd=FIELD(i) og.columns(i).header1.alignment=2 IF BETWEEN(i,11,FCOUNT()) og.columns(i).header1.caption=RIGHT(FIELD(i),1) ENDIF DO CASE CASE BETWEEN(i,2,4) OR INLIST(i,9) og.columns(i).DynamicBackColor="Icase(lx=1,RGB(255,0,0),lX=2,RGB(255,35,255),lX=3,RGB(20,128,255),lX=4,RGB(20,128,20),lX=5,RGB(255,128,20),RGB(255,255,255))" CASE BETWEEN(I,11,20) OR BETWEEN(I,31,40) OR BETWEEN(I,51,60) og.columns(i).DynamicBackColor="IIF(BETWEEN(&zd,'0','9'),RGB(255,0,0),RGB(255,255,255))" og.columns(i).DynamicForeColor="IIF(BETWEEN(&zd,'0','9'),RGB(255,255,255),RGB(192,192,192))" og.columns(i).DynamicAlignment="IIF(BETWEEN(&zd,'0','9'),2,3)" og.columns(i).DynamicFontSize="IIF(BETWEEN(&zd,'0','9'),12,9)" og.columns(i).DynamicFontBold="IIF(BETWEEN(&zd,'0','9'),.T.,.F.)" CASE BETWEEN(I,21,30) OR BETWEEN(I,41,50) og.columns(i).DynamicBackColor="IIF(BETWEEN(&zd,'0','9'),RGB(0,0,255),RGB(255,255,255))" og.columns(i).DynamicForeColor="IIF(BETWEEN(&zd,'0','9'),RGB(255,255,255),RGB(192,192,192))" og.columns(i).DynamicAlignment="IIF(BETWEEN(&zd,'0','9'),2,3)" og.columns(i).DynamicFontSize="IIF(BETWEEN(&zd,'0','9'),12,9)" og.columns(i).DynamicFontBold="IIF(BETWEEN(&zd,'0','9'),.T.,.F.)" ENDCASE ENDFOR
由于基础不是太好,上面这段代码,看的不是太懂,请教各位大神,帮我解决一下