Olá, fiz segue um exemplo desenvolvido com tSay e Tget, espero que ajude
#Include 'totvs.ch'
#Include 'protheus.ch'
/*/{Protheus.doc} User Function actionBtn
(long_description)
@type Function
@author Leandro Lemos
@since 15/04/2024
@version P12
@param param_name, param_type, param_descr
@return return_var, return_type, return_description
@example
(examples)
@see (links_or_references)
/*/
User Function actionBtn()
Local lEdita := .F.
Local oModal
Local oContainer
Local cGetVal1 := "0000,00"
Local cGetVal2 := "0000,00"
Local cSayTotal:= "0000,00"
oModal := FWDialogModal():New()
oModal:SetEscClose(.T.)
oModal:setTitle("título da Janela ")
oModal:setSubTitle("SubTitulo da Janela")
//Seta a largura e altura da janela em pixel
oModal:setSize(200, 140)
oModal:createDialog()
oModal:addCloseButton(nil, "Fechar")
oContainer := TPanel():New( ,,, oModal:getPanelMain() )
oContainer:Align := CONTROL_ALIGN_ALLCLIENT
oTGetVal1 := TGet():New( 1,1,{|u|if(PCount()==0,cGetVal1,cGetVal1:=u)},oContainer,020,011,"@E 9999,99",,0,,,.F.,,.T.,,.F.,,.F.,.F.,,.F./*lReadOnly*/,.F.,,'cGetVal1'/*cReadVar*/,,,,)
oTGetVal1:bWhen := {|| lEdita }
oTGetVal1:bChange := {||cSayTotal := Transform(val(cGetVal1)+val(cGetVal2),"@E 999,999,999.99")}
oTGetVal2 := TGet():New( 20,1,{|u|if(PCount()==0,cGetVal2,cGetVal2:=u)},oContainer,020,011,"@E 9999,99",,0,,,.F.,,.T.,,.F.,,.F.,.F.,,.F./*lReadOnly*/,.F.,,'cGetVal2'/*cReadVar*/,,,,)
oTGetVal2:bWhen := {|| lEdita }
oTGetVal2:bChange := {|| cSayTotal := Transform(val(cGetVal1)+val(cGetVal2),"@E 999,999,999.99")}
oSayTotal := TSay():New(40,1,{||cSayTotal},oContainer,,,,,,.T.,CLR_RED,CLR_WHITE,300,20)
oBtnEdita := TButton():New(60, 1, "Libera Edição", oContainer, {|| lEdita := .T.}, 100, 20, , , , .T., , , , , , )
oModal:Activate()
Return