Hi, I've got an Internet Explorer control running along side a Mozilla one in a c# app, I want the user to be able to type CSS in a text box and it update instantly in both IE and Moz, so I'm using this code (IE = WebBrowser Control, moz = axMozilla control, css = RichTextBox Control):
newCSSLoc = System.IO.Directory.GetCurrentDirectory() + "\\tmpCSS.css"; css.SaveFile(newCSSLoc, RichTextBoxStreamType.PlainText); IE.Document.GetElementsByTagName("LINK")[0].SetAttribute("href", "file:///" + newCSSLoc); mshtml.IHTMLDocument2 oDoc; oDoc = (mshtml.IHTMLDocument2)moz.Document; mshtml.IHTMLElementCollection oColl; oColl = (mshtml.IHTMLElementCollection)oDoc.all; foreach (mshtml.IHTMLElement ele in oDoc.all) { ele.setAttribute("href", "file:///" + newCSSLoc, 0); } (Obviously this code actually changes the href (or adds one) of every single element - but I'm just using this is an example). This works fine for IE (it updates instantly) but Mozilla doesn't, I have to do moz.refresh(), which is messy - is there any other way of forcing the mozilla control to re-render without it getting the HTML again? As far as i understand it, IE renders again each time the stylesheet ref is changed, whereas mozilla doesn't. Help! _______________________________________________ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding