Alguém poderia dar uma luz nessa rotina? Não formata o GetBox corretamente.
#include "minigui.ch"
Procedure Main
Local cMascara:= Space(20)
Local cNome:= Space(40)
Define Window Form_1 ;
AT 0,0 ;
Width 600 ;
Height 400 ;
NoSize ;
Main
Define Label Label_Mascara
Col 010
Row 137
AutoSize .T.
Value 'Mascara:'
End Label
Define GetBox Gbox_Mascara
Col 090
Row 134
Width 128
Value cMascara
Picture '####################'
OnChange {||MudaPicture(Form_1.Gbox_Mascara.Value,cMascara)}
End GetBox
Define Label Label_Nome
Col 010
Row 170
AutoSize .T.
Value 'Nome:'
End Label
Define GetBox Gbox_Nome
Col 090
Row 167
Width 250
Value cNome
End GetBox
End Window
Form_1.Center
Form_1.Activate
Return
Function MudaPicture()
Local cTxt
cTxt:= GetProperty('Form_1', 'Gbox_Mascara', 'Value')
If SubStr(cTxt,1,1) == '1'
SetProperty('Form_1','Gbox_Mascara','Picture', '9.999.999.999')
DoMethod('Form_1','Gbox_Mascara','SetFocus')
EndIf
Return(.T.)