Subject |
Re: entryfield focus |
From |
Mustansir Ghor <mustan31@hotmail.com> |
Date |
Tue, 23 Apr 2019 12:29:44 -0400 |
Newsgroups |
dbase.getting-started |
Dear All
What action triggers on_change event of an entry field especially when it has focus.
Regards
Mustansir
Mervyn Bick Wrote:
> On 2019-04-22 10:29 PM, Charlie wrote:
> > I have a form where I have a trigger on an entryfield that fires when it gains focus and when it loses focus. It works great but on-open evidently the entryfield gets focus and loses focus and triggers some code that is undesired. Is there a way to fix this? Thanks!!!
> >
>
> Instead of assigning the onGotFocus and onLostFocus event handlers in
> the constructor code for the entryfield assign the event handlers in the
> form's onOpen event handler.
>
> this.ENTRYFIELD1 = new ENTRYFIELD(this)
> with (this.ENTRYFIELD1)
> // onGotFocus = class::ENTRYFIELD1_ONGOTFOCUS
> // onLostFocus = class::ENTRYFIELD1_ONLOSTFOCUS
> height = 1.0
> left = 12.0
> top = 2.5
> width = 8.0
> value = "Entryfield1"
> endwith
>
>
> function form_onOpen()
> form.entryfield1.onGotFocus := class::ENTRYFIELD1_ONGOTFOCUS
> form.entryfield1.onLostFocus := class::ENTRYFIELD1_ONLOSTFOCUS
> return
>
>
> Mervyn.
|
|