使用测试系统TIPTOP GP3.0 颜色的设置分为单身颜色和单头颜色的设置: 一、单身颜色: 1.首先MAIN函数之前定义一个数组 例如: [html] DEFINE ga_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(ga_color) 3._fill函数里面 首先 CALL ga_color.clear() #清空 然后 FOREACH 里面 判断并赋值(可以对多个栏位,也可以是某一个栏位) [html] IF g_ta_gja[g_cnt].tc_gja10 >5 AND g_ta_gja[g_cnt].tc_gja10<10 THEN LET ga_color[g_cnt].c01 ="" LET ga_color[g_cnt].c02 ="" LET ga_color[g_cnt].c03 ="" LET ga_color[g_cnt].c04 ="" LET ga_color[g_cnt].c05 ="" LET ga_color[g_cnt].c06 ="" LET ga_color[g_cnt].c07 ="" LET ga_color[g_cnt].c08 ="" LET ga_color[g_cnt].c09 ="" LET ga_color[g_cnt].c10 ="red" LET ga_color[g_cnt].c11 ="" LET ga_color[g_cnt].c12 ="" ELSE IF g_ta_gja[g_cnt].tc_gja10>10 THEN LET ga_color[g_cnt].c01 ="" LET ga_color[g_cnt].c02 ="" LET ga_color[g_cnt].c03 ="" LET ga_color[g_cnt].c04 ="" LET ga_color[g_cnt].c05 ="" LET ga_color[g_cnt].c06 ="" LET ga_color[g_cnt].c07 ="" LET ga_color[g_cnt].c08 ="" LET ga_color[g_cnt].c09 ="" LET ga_color[g_cnt].c10 ="blue" LET ga_color[g_cnt].c11 ="" LET ga_color[g_cnt].c12 ="" ELSE LET ga_color[g_cnt].c01 ="" LET ga_color[g_cnt].c02 ="" LET ga_color[g_cnt].c03 ="" LET ga_color[g_cnt].c04 ="" LET ga_color[g_cnt].c05 ="" LET ga_color[g_cnt].c06 ="" LET ga_color[g_cnt].c07 ="" LET ga_color[g_cnt].c08 ="" LET ga_color[g_cnt].c09 ="" LET ga_color[g_cnt].c10 ="green blod" LET ga_color[g_cnt].c11 ="" LET ga_color[g_cnt].c12 ="" END IF END IF 效果图如下图片: 二、单头颜色: 1.可以直接在画面档(per档)或者4gl档里面设置颜色 例如: <1>【per档设置】gja02 = gja02,COLOR=GREEN;(color) <2>【per档设置】ima26 = ima26,COLOR = RED WHERE ima26>1000; <3>【per档设置】DATEEDIT tc_gja03 = tc_gja03,COLOR=GREEN,REVERSE; <4>【4gl档设置】DISPLAY p_ima01 TO ima01 ATTRIBUTE(BOLD,GREEN) <5>【4gl档设置】DISPLAY BY NAME g_ima.* ATTRIBUTE(REVERSE,BOLD,GREEN) <6>【4gl档设置】CALL cl_set_comp_font_color("ima01,ima02a","RED") <7>【per档设置】GRID (fontpitch=FIXED) fontpitch:这个属性定义字符的字体类型作为固定或变量在使用默认字体。 COLOR: 【用途】 The COLOR attribute defines the foreground color of the text displayed by a form element. 【说明】 1.color-name can be: BLACK, BLUE, CYAN, GREEN, MAGENTA, RED, WHITE, and YELLOW. 2.For backward compatibility, color-name can be combined with an intensity keyword: REVERSE, LEFT, BLINK, and UNDERLINE. COLOR WHERE : 【用途】 The COLOR WHERE attribute defines a condition to set the foreground color dynamically. 【说明】 1.color-name can be: BLACK, BLUE, CYAN, GREEN, MAGENTA, RED, WHITE, and YELLOW. 2.color-name can also be an intensity keyword: REVERSE, LEFT, BLINK, and UNDERLINE. 3.boolexpr defines a Boolean expression with a restricted syntax. 4.The Boolean expression is automatically evaluated at runtime to check when the color attribute must be set. 效果图如下几张图片: |
This man is too old to remember everything in his brain. Right now, he needs a place to write down what he has studied.
標籤
4GL
(1)
人才發展
(10)
人物
(3)
太陽能
(4)
心理
(3)
心靈
(10)
文學
(31)
生活常識
(14)
光學
(1)
名句
(10)
即時通訊軟體
(2)
奇狐
(2)
爬蟲
(1)
音樂
(2)
產業
(5)
郭語錄
(3)
無聊
(3)
統計
(4)
新聞
(1)
經濟學
(1)
經營管理
(42)
解析度
(1)
遊戲
(5)
電學
(1)
網管
(10)
廣告
(1)
數學
(1)
機率
(1)
雜趣
(1)
證券
(4)
證券期貨
(1)
ABAP
(15)
AD
(1)
agentflow
(4)
AJAX
(1)
Android
(1)
AnyChart
(1)
Apache
(14)
BASIS
(4)
BDL
(1)
C#
(1)
Church
(1)
CIE
(1)
CO
(38)
Converter
(1)
cron
(1)
CSS
(23)
DMS
(1)
DVD
(1)
Eclipse
(1)
English
(1)
excel
(5)
Exchange
(4)
Failover
(1)
Fedora
(1)
FI
(57)
File Transfer
(1)
Firefox
(3)
FM
(2)
fourjs
(1)
Genero
(1)
gladiatus
(1)
google
(1)
Google Maps API
(2)
grep
(1)
Grub
(1)
HR
(2)
html
(23)
HTS
(8)
IE
(1)
IE 8
(1)
IIS
(1)
IMAP
(3)
Internet Explorer
(1)
java
(4)
JavaScript
(22)
jQuery
(6)
JSON
(1)
K3b
(1)
ldd
(1)
LED
(3)
Linux
(117)
Linux Mint
(4)
Load Balance
(1)
Microsoft
(2)
MIS
(2)
MM
(51)
MSSQL
(1)
MySQL
(27)
Network
(1)
NFS
(1)
Office
(1)
OpenSSL
(1)
Oracle
(126)
Outlook
(3)
PDF
(6)
Perl
(60)
PHP
(33)
PL/SQL
(1)
PL/SQL Developer
(1)
PM
(3)
Postfix
(2)
postfwd
(1)
PostgreSQL
(1)
PP
(50)
python
(5)
QM
(1)
Red Hat
(4)
Reporting Service
(28)
ruby
(11)
SAP
(234)
scp
(1)
SD
(16)
sed
(1)
Selenium
(3)
Selenium-WebDriver
(5)
shell
(5)
SQL
(4)
SQL server
(8)
sqlplus
(1)
SQuirreL SQL Client
(1)
SSH
(2)
SWOT
(3)
Symantec
(2)
T-SQL
(7)
Tera Term
(2)
tip
(1)
tiptop
(24)
Tomcat
(6)
Trouble Shooting
(1)
Tuning
(5)
Ubuntu
(37)
ufw
(1)
utf-8
(1)
VIM
(11)
Virtual Machine
(2)
VirtualBox
(1)
vnc
(3)
Web Service
(2)
wget
(1)
Windows
(19)
Windows
(1)
WM
(6)
Xvfb
(2)
youtube
(1)
yum
(2)
2015年4月23日 星期四
tiptop 表格cell 動態指定顏色
http://www.bkjia.com/HTML5/477324.html
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言