karinha wrote:Algo asi?
- Code: Select all Expand view
// C:\FWH..\SAMPLES\SILVGETN.PRG
#Include "FiveWin.ch"
STATIC oDlg, oFont
FUNCTION Main()
LOCAL oGet, cVar := Space(100)
LOCAL oBtnX2, cTitle, aGrad, oSay
cTitle := "Cambia GET"
DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 14
DEFINE DIALOG oDlg SIZE 600, 200 PIXEL TRUEPIXEL RESIZABLE ;
TITLE cTitle GRADIENT aGrad FONT oFont
oDlg:lHelpIcon := .F.
@ 12, 2 GET oGet VAR cVar SIZE 200,20 PIXEL OF oDlg FONT oFont ;
PICTURE "@R 99,999,999,999.99"
ACTIVATE DIALOG oDlg CENTERED ON INIT( CAMBIA_PICT( oGet ) )
RETURN NIL
FUNCTION CAMBIA_PICT( oGet )
LOCAL cPict := "012345678912"
oGet:VARPUT( cPict )
oGet:Refresh()
RETURN( .T. )
// FIN / END
Regards, saludos.
NOI must write a string no a price
I must write also "." sample: 36.67.80.7.3.23.45 and not PICTURE "@R 99,999,999,999.99"
because the tget control is read by a procedure that finds the numbers in the xbrowse and colors them as you can see here
oGet:bChange := {|nKey|(Chr(nKey)$"0123456789.")}
oGet:bKeyDown := { | nKey |(oGet:assign(), ActiveNavigator(cVar,oBrw,oItem2:lChecked)) }
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com