How to count input word in TGet?
Posted: Fri Dec 21, 2007 3:41 am
Hi
this function like Web site Send SMS input UI.
Redefine GET ... ON CHNAGE....
I need show how many space can input in GET Object.
The problem is ON CHANGE can't Refresh other Object of FWH.
Source code:
***********************************
nLEFT1:=LEN(PAY->RMK1)-LEN(TRIM(PAY->RMK1))
nLEFT2:=LEN(PAY->RMK2)-LEN(TRIM(PAY->RMK2))
REDEFINE GET PAY->RMK1 ID 21 OF oDlg ;
ON CHANGE LEFT_SHOW(1) ;
UPDATE
REDEFINE GET PAY->RMK2 ID 23 OF oDlg ;
ON CHANGE LEFT_SHOW(2) ;
UPDATE
REDEFINE SAY oLEFT1 PROMPT nLEFT1 PICTURE "99" ID 12 OF oDlg ;
UPDATE
REDEFINE SAY oLEFT2 PROMPT nLEFT2 PICTURE "99" ID 14 OF oDlg ;
UPDATE
....
************************
STATIC FUNCTION LEFT_SHOW(nLINE)
DO CASE
CASE nLINE=1
nLEFT1:=LEN(PAY->RMK1)-LEN(TRIM(PAY->RMK1))
oLEFT1:REFRESH() ==> NOT WORK
CASE nLINE=2
nLEFT2:=LEN(PAY->RMK2)-LEN(TRIM(PAY->RMK2))
oLEFT2:REFRESH() ==> NOT WORK
ENDCASE
RETURN NIL
**************************************
this function like Web site Send SMS input UI.
Redefine GET ... ON CHNAGE....
I need show how many space can input in GET Object.
The problem is ON CHANGE can't Refresh other Object of FWH.
Source code:
***********************************
nLEFT1:=LEN(PAY->RMK1)-LEN(TRIM(PAY->RMK1))
nLEFT2:=LEN(PAY->RMK2)-LEN(TRIM(PAY->RMK2))
REDEFINE GET PAY->RMK1 ID 21 OF oDlg ;
ON CHANGE LEFT_SHOW(1) ;
UPDATE
REDEFINE GET PAY->RMK2 ID 23 OF oDlg ;
ON CHANGE LEFT_SHOW(2) ;
UPDATE
REDEFINE SAY oLEFT1 PROMPT nLEFT1 PICTURE "99" ID 12 OF oDlg ;
UPDATE
REDEFINE SAY oLEFT2 PROMPT nLEFT2 PICTURE "99" ID 14 OF oDlg ;
UPDATE
....
************************
STATIC FUNCTION LEFT_SHOW(nLINE)
DO CASE
CASE nLINE=1
nLEFT1:=LEN(PAY->RMK1)-LEN(TRIM(PAY->RMK1))
oLEFT1:REFRESH() ==> NOT WORK
CASE nLINE=2
nLEFT2:=LEN(PAY->RMK2)-LEN(TRIM(PAY->RMK2))
oLEFT2:REFRESH() ==> NOT WORK
ENDCASE
RETURN NIL
**************************************