[Mono-list] Gecko.WebControl and the Public Events

Chris Howie cdhowie at gmail.com
Mon Feb 25 22:28:03 EST 2008


On Sat, Feb 23, 2008 at 9:53 PM, Jérôme Martin <gooogle at free.fr> wrote:
> Hi,
>
> I'm currently using Gecko.WebControl class to do a little Brower.
>
> [snip]
>
> 2 - how does work the NewWindow Event for WebControl ?
>
> when i had handler to it, it's works (i go to my method):
>
> this.webCtrl.NewWindow += new NewWindowHandler(on_webCtrl_NewWindow);
>
> But what can i do here ? What i'm suppose to do here ?

Whatever you want to do.  Each application embedding WebControl may
want to do something different -- you may want to open a window,
others may want to open a tab, still others may want to ignore it...

> So how can i use it ? Do i have to create a new WebControl to put the new
> Window ?

That would be one way to do it.

> how can i tell the first webcontrol to don't go to the new link ?

Presumably you set NewEmbed to the instance of WebControl you are
using, though I am not sure.  There is no way I can see on
NewWindowArgs to obtain the URL being navigated to, because there may
not be one.

My guess is that you set NewEmbed to a reference to the new WebControl
object and the current one will make it navigate there itself.
Setting it to your current instance may make it tell itself to go
there.

> Do a WebControl manager many pages ?

No, it views exactly one page.  You have to instantiate new
WebControls if you want to offer the ability to view more than one at
a time.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers


More information about the Mono-list mailing list