Agrege un boton para limpiar el formulario pero no se como dejarlo vacio
Intente esto
Code: Select all
Main.txt_Sector.Value := ''
Main.txt_Sector.Value := Nil
Moderator: Rathinagiri
Code: Select all
Main.txt_Sector.Value := ''
Main.txt_Sector.Value := Nil
Code: Select all
#include "hmg.ch"
Function Main
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 320 HEIGHT 200 ;
TITLE 'TextBox Vacio' ;
MAIN
@ 10,10 TEXTBOX Text_1 ;
VALUE 123 ;
TOOLTIP 'Numeric TextBox' ;
NUMERIC ;
MAXLENGTH 5 ;
RIGHTALIGN
DEFINE BUTTON C
ROW 60
COL 80
WIDTH 160
CAPTION 'Set Text_1 Vacio'
ACTION TxtVacio()
END BUTTON
END WINDOW
Form_1.Center
Form_1.Activate
Return Nil
Func TxtVacio()
Local nControlHandle:=GetControlHandle("Text_1","Form_1")
SetWindowText ( nControlHandle , "" )
Return Nil