WebBrowser Doubleclick Selection

  • Thread starter Thread starter atn2002
  • Start date Start date
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
 
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
 
Back
Top