On change event fired on Date textbox

Moderator: Rathinagiri

Post Reply
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

On change event fired on Date textbox

Post by Rathinagiri »

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:

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   
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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: On change event fired on Date textbox

Post by sudip »

Hello Rathi,

I also found the same thing.
Previously I thought it's a behavior.
Thanks :)
With best regards,
Sudip
Post Reply