newsgroups-index (beta)

Current group: dbase.bug-reports

OnLostFocus when child form opened

OnLostFocus when child form opened  
Bruce Beacham
 Re: OnLostFocus when child form opened  
Marty Kay
From:Bruce Beacham
Subject:OnLostFocus when child form opened
Date:Sun, 09 Jan 2005 19:30:41 +0000
Hi

This code shows that if a modal form is called from an opened form, the
onLostFocus of the opened form does not fire.

When the modal form is closed, the opened form's onGotFocus does fire.

Save this code to a file, run it and click on the Get Modal Form
pushbutton. Watch the Results pane - nothing happens at that point.

Close the modal form and watch the Results pane.


Bruce Beacham

***
* To demonstrate that onLostFocus doesn't fire when
* a modal form is called.

f = new form()
f.onLostFocus = {||; ? "Losing Focus" }
f.onGotFocus = {||; ? "Getting Focus" }
f.pb = new pushbutton(f)
f.pb.text = "Modal Form"
f.pb.onClick = {||; private mf ; mf = new form() ; ;
mf.autocenter := true ; mf.tx = new text(mf) ; ;
mf.tx.text = "Opened" ; mf.mdi = false ; mf.readmodal() }

f.open()
***
From:Marty Kay
Subject:Re: OnLostFocus when child form opened
Date:Mon, 17 Jan 2005 18:19:34 -0500
Hi Bruce,

This is already in the system as QAID: 697

Thanks,

- Marty Kay (dBI) -


"Bruce Beacham" wrote in message
news:SdZIqHo9EHA.1132@news-server...
> Hi
>
> This code shows that if a modal form is called from an opened form, the
> onLostFocus of the opened form does not fire.
>
> When the modal form is closed, the opened form's onGotFocus does fire.
>
> Save this code to a file, run it and click on the Get Modal Form
> pushbutton. Watch the Results pane - nothing happens at that point.
>
> Close the modal form and watch the Results pane.
>
>
> Bruce Beacham
>
> ***
> * To demonstrate that onLostFocus doesn't fire when
> * a modal form is called.
>
> f = new form()
> f.onLostFocus = {||; ? "Losing Focus" }
> f.onGotFocus = {||; ? "Getting Focus" }
> f.pb = new pushbutton(f)
> f.pb.text = "Modal Form"
> f.pb.onClick = {||; private mf ; mf = new form() ; ;
> mf.autocenter := true ; mf.tx = new text(mf) ; ;
> mf.tx.text = "Opened" ; mf.mdi = false ; mf.readmodal() }
>
> f.open()
> ***
   

Copyright © 2006 newsgroups-index   -   All rights reserved   -   Impressum