Dear all,
I'm having some problem in doing validation check on whether it is numeric value or not after read progress in defined window.I'd ended up to reconstruct the defined windows each time if failed to
validate as true. Is there any good way to perform validation check without reconstruct the defined windows?
My Coding
define class btn_quan as CommandButton
procedure click
local win_name,vl_width,vl_height,;
vl_result,vl_stat
vl_stat = .t.
vl_result = SPACE(8)
win_name = "Change Quantity"
vl_width = this.parent.width/3
vl_height = 4
do while vl_stat = .t.
define windows win_name at 1,1 size vl_height,vl_width ;
TITLE "Change Quantity!" ;
COLOR RGB(255,0,0,94,94,94) ;
close
move wind win_name center
activate wind win_name
@ 1,1 SAY "Type to change :"
@ 1,17 GET vl_result
read =>I've no idea to perform validate check after read progress here.
if type(vl_result) <> 'N'
messagebox("Numeric value only!")
vl_result = SPACE(8)
else
vl_stat = .f.
endif
release win_name =>Destroy the defined windows for later reconstruct again once failed in validate.
clear
enddo
release wind win_name
clear
endpro
enddefine
Thanks appopriate to all mindful helps.
I'm having some problem in doing validation check on whether it is numeric value or not after read progress in defined window.I'd ended up to reconstruct the defined windows each time if failed to
validate as true. Is there any good way to perform validation check without reconstruct the defined windows?
My Coding
define class btn_quan as CommandButton
procedure click
local win_name,vl_width,vl_height,;
vl_result,vl_stat
vl_stat = .t.
vl_result = SPACE(8)
win_name = "Change Quantity"
vl_width = this.parent.width/3
vl_height = 4
do while vl_stat = .t.
define windows win_name at 1,1 size vl_height,vl_width ;
TITLE "Change Quantity!" ;
COLOR RGB(255,0,0,94,94,94) ;
close
move wind win_name center
activate wind win_name
@ 1,1 SAY "Type to change :"
@ 1,17 GET vl_result
read =>I've no idea to perform validate check after read progress here.
if type(vl_result) <> 'N'
messagebox("Numeric value only!")
vl_result = SPACE(8)
else
vl_stat = .f.
endif
release win_name =>Destroy the defined windows for later reconstruct again once failed in validate.
clear
enddo
release wind win_name
clear
endpro
enddefine
Thanks appopriate to all mindful helps.