WebBrowser Doubleclick Selection

A

atn2002

With WebBrowser control in .NET 2.0, in DesignMode, when I double click
a word to select it and then try to type, it won't let me, until I
press Delete or Backspace and manually click on the page to reset the
carriage. Clicking and dragging to select text works as expected, it's
only when double clicking. This behaviour doesn't seem to be a problem
with the past DOM, but I'm trying to avoid that path again. Anyone
have any ideas?

It would be interesting to see who else can duplicate this. Simply
create a new form in VS, add a WebBrowser Control and then add this
line in the constructor or load event:

this.webBrowser1.Document.DomDocument.GetType().GetProperty("designMode").SetValue(this.webBrowser1.Document.DomDocument,
"On", null);

or

this.webBrowser1.Document.ExecCommand("EditMode", true, null);
(Neither work)

Norm
 
T

Tim Anderson

It would be interesting to see who else can duplicate this.

I get the same result as you. I did contemplate trying to use the Edit mode
with the webbrowser control, but gave up on the idea; the wrapper doesn't
expose enough of the MSHTML customization features to make it work
satisfactorily (aside from the bug you have discovered).

I still use my htmleditor (http://www.itwriting.com/htmleditor/index.php)
though I have a few things to do to improve it.

Tim
Agitator and Team System compared
http://www.itwriting.com/blog/?postid=350
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top