On change event fired on Date textbox
Posted: Mon Jul 05, 2010 11:41 am
In date type textboxes, on change event is fired even before initializing the value (that may be because of inserting the date separator characters).
Please consider this example:
Even before the window is activated, on change event is fired here for date textbox. It would be better to keep it equal for all controls.
Please consider this example:
Code: Select all
#include <hmg.ch>
function main
define window sample at 0,0 width 200 height 200 main
define textbox date1
row 10
col 10
width 120
date .t.
on change msginfo("Date Changed")
end textbox
define textbox number1
row 40
col 10
width 120
numeric .t.
on change msginfo("Number Changed")
end textbox
end window
sample.center
sample.activate
return nil