Re: Focus issues

From: Tristan Leask (no_at_no.com)
Date: 11/23/04


Date: Tue, 23 Nov 2004 09:14:05 -0000

Cheers Igor for replying....

The focus is set depending on what was the last active form. If it was the
toolbar that was last selected then either the combo box is dropped down or
on of the command buttons is fired. If the user had last used an option on
the form itself that holds the WB control, then any of the command buttons
on this form can be fired. Basically the last control that you selected
gets the focus back randomly. I am only setting values or changed the
display values in the commandstatechange event. I am not setting any focus.
If it helps i am using the WB in Visual FoxPro.

Cheers,

Tristan

"Igor Tandetnik" <itandetnik@mvps.org> wrote in message
news:eIaZ8ZL0EHA.3908@TK2MSFTNGP10.phx.gbl...
> "Tristan Leask" <no@no.com> wrote in message
> news:e$$rMVL0EHA.2228@TK2MSFTNGP15.phx.gbl
> > I am having a real problem with the webbrowser control. I have some
> > code in the commandstatechange event that sets some combo boxes and
> > buttons with the font/size/bold etc. If i randomly enter characters
> > into the window (contenteditable=.t.) then the webbrowser control
> > decides to lose focus. This is completely random. However i can stop
> > the issue from happening if i remove all code from the
> > commandstatechange event.
>
> When WB loses focus, who gains it? I suspect the code in your handler
> gives focus to one of those other controls.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>