HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
AxWebBrowser width HTML elements
Posted by: Hernan (---.200-3-94.telecom.net.ar)
Date: Tuesday, 04-Jul-2006, 14:31:55

I can not resolve this problem.
When I attach onchange event to my browser I can not drop down the html select element.
If I do double click over the html select element it drops down.

Pleeeeeease help !


private void axWebBrowser_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
{
HTMLDocumentClass htmlDoc = (HTMLDocumentClass)this.axWebBrowser.Document;
HTMLSelectElement combo = (HTMLSelectElement)htmlDoc.getElementById("test");
((mshtml.HTMLSelectElementEvents2_Event)combo).onchange += new mshtml.HTMLSelectElementEvents2_onchangeEventHandler(this.Select_onchange);
}

private void Select_onchange(IHTMLEventObj e)
{
System.Windows.Forms.MessageBox.Show("Cambio un: "+ e.srcElement.tagName + " nombre: " + e.srcElement.id + " valor " + e.srcElement.getAttribute("value",0));
}

Re: AxWebBrowser width HTML elements
Posted by: Tim (---.gotadsl.co.uk)
Date: Tuesday, 04-Jul-2006, 14:55:21

Please bear in mind that this whole project was an effort *not* to use the Axwebbrowser, so we are not really the right people to ask!

I'm shortly updating the code so you can host ShDocVw instead of Mshtml.

Tim

Re: AxWebBrowser width HTML elements
Posted by: Hernan (---.200-3-94.telecom.net.ar)
Date: Tuesday, 04-Jul-2006, 16:10:30

Ok, no problem
I keep on trying
Regards !

Re: AxWebBrowser width HTML elements
Posted by: Tim (---.gotadsl.co.uk)
Date: Wednesday, 05-Jul-2006, 10:32:57

It is probably to do with how you are hooking up to the event; there are a number of different ways to do this and the one you are using has strange side-effects; I think you have to implement some of the COM interfaces to do it successfully.

Tim



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
Xmbcv
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.