April 23, 2024, 01:49:08 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Events of a field on a form

Started by Rock Ridge Farm (Larry), October 16, 2006, 07:57:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rock Ridge Farm (Larry)

I am trying to associate events to a field on a form.
The events are:
    Entry
    Leave
    Data Entered
    Data Changed
Is there already a way to detect these events? I thought I could use the hControl value but
have had no luck.

What I would like to do is
On leave of field {
    do stuff
}
On entry of field {
    do stuff
}
On value-changed of field {
    do stuff
}

Any ideas?


Bruce Peaslee

If you mean you want to detect things in an edit control, you can use:

ENSETFOCUS (control got focus)
ENKILLFOCUS (control lost focus)
ENCHANGE (data has changed)
ENUPDATE(control about to update)


dlg::OnControl(int nID, int nNotifyCode, unsigned int hControl),int
{
ÂÃ,  ÂÃ, select nID
ÂÃ,  ÂÃ, {
ÂÃ,  ÂÃ,  ÂÃ,  case EditControl_1:
ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ, if (nNotifyCode == ENKILLFOCUS)
ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,  // control lost focus
ÂÃ,  ÂÃ, }
}


If this is not what you were looking for, it still may be useful for someone elseÂÃ,  ;)
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles