首页 > 学技术 > 技术网文 > IBM AS400应用论坛 > 正文

[精彩] 在dspf中!当光标移到field上就显高亮度(或是变色),光标移开就复原!


来源 chinaunix.net 酷勤网整理

怎么实现,
定义button挺麻烦的
有没有好一点的办法??



 Eagle_wolf 回复于:2006-01-11 19:52:19

ENTFLDATR这个应该可以实现


 mamei 回复于:2006-01-12 10:52:09

ENTFLDATR (Entry Field Attribute) keyword for display files
Use this field-, record-, or file-level keyword to define the leading attribute of the field that changes to a specified attribute whenever the cursor is located in the field. When defined at both the field- and record-level, the field-level specification is used for the field. The ENTFLDATR keyword is ignored when the work station is not attached to a controller that supports an enhanced data stream. 

The format of the keyword is: 

ENTFLDATR[([color] [display attribute] [cursor visible])]

The parameters are optional for the keyword. 

The color parameter specifies the color the field will change to when the cursor enters the field on a color work station. The parameter is specified as an expression of the form (*COLOR value). 
-------------------------------------------------------------------
Example: 

The following example shows how to specify the ENTFLDATR keyword: 

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A
     A     R RECORD
     A       F1            10A  B  3  4ENTFLDATR
     A       F2            10A  B 13  4ENTFLDATR((*COLOR RED))
     A       F3            10I  B 16  4ENTFLDATR(*NOCURSOR (*DSPATR HI RI))

In this example, the color turns white, the attribute is high intensity, and the cursor is visible for F1. For F2, the color is red, the attribute is high intensity, and the cursor is visible. For F3, the color is white, the attributes are high intensity and reverse image, and the cursor is not visible.


 huting974 回复于:2006-01-12 14:41:19

又学会了一招,海绵精神


 qingzhou 回复于:2006-01-13 10:04:16

引用:原帖由 Eagle_wolf 于 2006-1-11 19:52 发表
ENTFLDATR这个应该可以实现 


刚测试,没有实现~~~:roll:
是不是还缺少什么?


 USING_AS400 回复于:2006-01-13 12:26:29

以前弄过,在字段后面用一个关键字就可以了,忘了什么关键字了,呵呵


 Eagle_wolf 回复于:2006-01-13 13:24:20

引用:原帖由 qingzhou 于 2006-1-13 10:04 发表

刚测试,没有实现~~~:roll:
是不是还缺少什么? 


这个是我很久以前写的一个 可以看看 
     A*%%TS  SD  20050816  175043  RYP         REL-V4R4M0  5769-PW1

     A*%%EC
     A                                      DSPSIZ(24 80 *DS3)
     A*                                     MOUBTN(*ULD ENTER)
     A          R TITLE
     A*%%TS  SD  20050812  091216  RYP         REL-V4R4M0  5769-PW1
     A                                      OVERLAY
     A                                  1  3DATE
     A                                      EDTCDE(Y)
     A                                  1 71USER
     A                                      DSPATR(HI)
     A                                      COLOR(BLU)
     A                                  2 71SYSNAME
     A                                      DSPATR(HI)
     A                                      COLOR(WHT)
     A                                  3  2'__________________________________-
     A                                      ___________________________________-
     A                                      _________'
     A                                      DSPATR(HI)
     A                                  1 26'Auto Create ILE PGM In one step'
     A                                      DSPATR(HI)
     A                                  2  3TIME
     A          R END
     A*%%TS  SD  20050816  175043  RYP         REL-V4R4M0  5769-PW1
     A                                      OVERLAY
     A                                 22 64'F3 --  Exit'
     A                                      DSPATR(HI)
     A                                      COLOR(WHT)
     A                                 21  2'__________________________________-
     A                                      ___________________________________-
     A                                      _________'
     A                                      DSPATR(HI)
     A                                      COLOR(WHT)
     A            AAAAAA        77A  O 24  3DSPATR(ND)
     A          R PROGRESS
     A                                      FRCDTA
     A*%%TS  SD  20050810  182504  RYP         REL-V4R4M0  5769-PW1
     A                                      OVERLAY
     A            PROGBAR       77A  O 22  1
     A          R COVER
     A*%%TS  SD  20050809  172632  RYP         REL-V4R4M0  5769-PW1
     A                                      FRCDTA
     A                                      OVERLAY
     A            FLD001        68   O  5  4
     A            FLD002        68   O  6  4
     A            FLD003        68   O  7  4
     A            FLD004        68   O  8  4
     A            FLD005        68   O  9  4
     A            FLD006        68   O 10  4
     A            FLD007        68   O 11  4
     A            FLD008        68   O 12  4
     A            FLD009        68   O 13  4
     A            FLD010        68   O 14  4
     A            FLD011        68   O 15  4
     A            FLD012        68   O 16  4
     A            FLD013        68   O 17  4
     A            FLD014        68   O 18  4
     A            FLD015        68   O 19  4
     A            FLD016        68   O 20  4
     A            FLD017        68   O 21  4
     A            FLD018        68   O 22  4
     A          R MAIN                      SFL
     A*%%TS  SD  20050813  100124  RYP         REL-V4R4M0  5769-PW1
     A            SEQ            4S 0O  5  4DSPATR(UL)
     A            LIBNAME       10A  O  5 14
     A            EXECSTAT      20A  O  5 60
     A
     A  90                                  DSPATR(HI)
     A  80                                  DSPATR(RI)
     A  10                                  DSPATR(BL)
     A  10                                  COLOR(RED)
     A            FILENAME      10A  O  5 28
     A            MEMNAME       10A  O  5 43
     A          R MAINCTL                   SFLCTL(MAIN)
     A                                      LOCK
     A                                      FRCDTA
     A                                      CA03(03)
     A                                      PAGEDOWN(26)
     A                                      OVERLAY
     A*%%TS  SD  20050810  113529  RYP         REL-V4R4M0  5769-PW1
     A                                      RTNCSRLOC(&HORIZON &VERTIC)
     A                                      SFLCSRRRN(&RELRCD)
     A  60                                  SFLDSP
     A  60                                  SFLDSPCTL
     A N60                                  SFLCLR
     A  50                                  SFLEND(*MORE)
     A                                      SFLSIZ(0015)
     A                                      SFLPAG(0014)
     A            RELRCD         5S 0H
     A            HORIZON       10A  H
     A            VERTIC        10A  H
     A            RRNPAG         4S 0H      SFLRCDNBR(CURSOR)
     A            TITLES        76A  O  4  4
     A                                      DSPATR(HI)


 Eagle_wolf 回复于:2006-01-13 13:24:54

A          R PARM
     A*%%TS  SD  20050816  175043  RYP         REL-V4R4M0  5769-PW1
     A                                      CA03(03)
     A                                      PAGEDOWN(26)
     A                                      OVERLAY
     A                                      CSRLOC(LINNBR     POSNBR)
     A            LINNBR         3S 0H
     A            POSNBR         3S 0H
     A                                  7 15'The source file  lib         :'
     A                                      COLOR(WHT)
     A                                  9 15'The source file name         :'
     A                                      COLOR(WHT)
     A                                 11 15'Whether binding service pgm  :'
     A                                      COLOR(WHT)
     A                                 15 15'Whether binding bnddir       :'
     A                                      COLOR(WHT)
     A            SRCLIB1       10A  B  7 47CHECK(VN)
     A                                      CHECK(AB)
     A                                      DSPATR(UL)
     A                                      ENTFLDATR((*DSPATR HI))
     A                                      FLDCSRPRG(SRCLIB2)
     A                                      DSPATR(PC)
     A                                      CHECK(FE)
     A            SRCLIB2       10A  B  9 47CHECK(VN)
     A                                      CHECK(AB)
     A                                      DSPATR(UL)
     A                                      ENTFLDATR((*DSPATR HI))
     A                                      FLDCSRPRG(WSRV)
     A                                      CHECK(FE)
     A            WSRV           1A  B 11 47DSPATR(UL)
     A                                      VALUES('Y' 'N')
     A                                      FLDCSRPRG(WBNDDIR)
     A                                      ENTFLDATR((*DSPATR HI))
     A                                 13 23'service pgm    name  :'
     A                                      COLOR(WHT)
     A  30                                  DSPATR(ND)
     A            SRVNAME       10A  B 13 47CHECK(VN)
     A                                      FLDCSRPRG(DIRNAME)
     A  30                                  DSPATR(ND)
     A N30                                  DSPATR(UL)
     A N30                                  ENTFLDATR((*DSPATR HI))
     A                                 17 31'bnddir name  :'
     A                                      COLOR(WHT)
     A  40                                  DSPATR(ND)
     A            WBNDDIR        1A  B 15 47VALUES('Y' 'N')
     A                                      DSPATR(UL)
     A                                      ENTFLDATR((*DSPATR HI))
     A            DIRNAME       10A  B 17 47CHECK(VN)
     A  40                                  DSPATR(ND)
     A N30                                  DSPATR(UL)
     A N30                                  ENTFLDATR((*DSPATR HI))
     A                                 20 36'be sure that all the obj are in th-
     A                                      e lib list'
     A                                      COLOR(RED)
     A                                 18  2'Attention:'
     A                                      COLOR(RED)
     A                                      DSPATR(BL)
     A                                 19  2'the module that the pgms will bind-
     A                                       must have been existent'
     A                                      COLOR(RED)
     A                                 11 51'(Y/N)'
     A                                 15 51'(Y/N)'
     A                                  5 15'The Pgm    Lib   Name        :'
     A                                      DSPATR(HI)
     A            OBJLIB        10A  B  5 47CHECK(AB)
     A                                      DSPATR(UL)
     A                                      ENTFLDATR((*DSPATR HI))
     A                                      FLDCSRPRG(SRCLIB1)
     A                                      DSPATR(PC)
     A                                      CHECK(FE)
     A                                      CHECK(VN)
     A          R MSGWDW
     A*%%TS  SD  20050812  171609  RYP         REL-V4R4M0  5769-PW1
     A                                      WINDOW(10 15 7 50)
     A                                      WDWBORDER((*COLOR WHT) (*DSPATR HI))
     A            MSG           48A  B  4  2
     A                                      COLOR(WHT)
     A          R INFO
     A                                      CA03(03)
     A                                      FRCDTA
     A                                      PAGEDOWN(26)
     A                                      OVERLAY
     A*%%TS  SD  20050812  201125  RYP         REL-V4R4M0  5769-PW1
     A                                 10 29'Preparing Enviroment'
     A  20                                  DSPATR(ND)
     A*           INFOMESG      57A  O 10 19
     A                                 11 29'collecting data '
     A
     A N20                                  DSPATR(ND)
     A                                      COLOR(PNK)
     A                                 19  2'__________________________________-
     A                                      ___________________________________-
     A                                      _________'
     A                                      DSPATR(HI)
     A                                      COLOR(WHT)
     A          R RTNINFO
     A*%%TS  SD  20050815  164246  RYP         REL-V4R4M0  5769-PW1
     A                                      WINDOW(10 15 7 50)
     A                                      WDWBORDER((*COLOR WHT) (*DSPATR HI))
     A                                  2  2'成功程序个数:'
     A                                      COLOR(WHT)
     A            NUMSUC         5  0O  3 19DSPATR(UL)
     A                                  5  2'失败程序个数:'
     A                                      COLOR(WHT)
     A            NUMFAIL        5  0O  6 19DSPATR(UL)



 Stealer 回复于:2006-03-01 17:31:24

A       F3            10I  B 16  4ENTFLDATR(*NOCURSOR (*DSPATR HI RI))中 I 是什么类型呀?为什么变量不可输入?


 mickeycheng 回复于:2006-03-02 15:12:20

我试了一下,OK! 不知这玩意能派啥用场。。。




原文链接:http://bbs.chinaunix.net/viewthread.php?tid=686980
转载请注明作者名及原文出处



收藏本页到: