Necesito que un control SAY muestre el valor numerico que contiene el control GET,
logre hacerlo solamente con la parte entera, pero con los decimales no lo hace.
Code: Select all
#define TO_PICTURE := "@E 999,999,999,999.99"
static lfirst := .T.
...
@ 1.6, 4 GET oGet VAR uTemp SIZE 120, 12 OF oDlg
@ 3.6, 4 SAY oSay PROMPT "" SIZE 120, 12 OF oDlg PICTURE TO_PICTURE
ACTIVATE DIALOG oDlg;
CENTERED;
ON INIT OnInitMsgGetEx( oGet, oDlg, oSay )
static Function OnInitMsgGetEx( oGet, oDlg, oSay )
oGet:cPicture = TO_PICTURE
oGet:bKeyChar = <|k,f,o|
Local cBuffer := ""
if lfirst
lfirst := .F.
SetWindowText( oSay:hWnd, "")
Return Nil
endif
cbuffer := strtran(o:oGet:buffer, ",", "")
cbuffer := AllTrim(cbuffer)
cbuffer := cbuffer + Chr(k)
cbuffer := Val(cbuffer)
SetWindowText( oSay:hWnd, Transform( cbuffer, TO_PICTURE) )
Return Nil
>
Return Nil
https://i.postimg.cc/SxpRCzhC/get.png
[/img]
Saludos