<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0">
  <channel>
    <title>HtmlEditor</title>
    <link>http://www.itwriting.com/phorum/list.php?3</link>
    <description><![CDATA[For discussion of the .Net HTMLEditor control]]></description>
    <language>EN</language>
    <pubDate>Mon, 18 Nov 2002 13:32:34 +0000</pubDate>
    <lastBuildDate>Mon, 18 Nov 2002 13:32:34 +0000</lastBuildDate>
    <category>HtmlEditor</category>
    <generator>Phorum 5.1.25</generator>
    <ttl>60</ttl>
    <item>
      <title>Re: one dumb question</title>
      <link>http://www.itwriting.com/phorum/read.php?3,174,179#msg-179</link>
      <author>Jerry Dilfer</author>
      <description><![CDATA[Thanks.  I understand the event generation now.  The basic key events in new version work well.  As it stands, the control is very useful.]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,174,179#msg-179</guid>
      <pubDate>Mon, 18 Nov 2002 13:32:34 +0000</pubDate>
    </item>
    <item>
      <title>Re: one dumb question</title>
      <link>http://www.itwriting.com/phorum/read.php?3,174,177#msg-177</link>
      <author>Tim Anderson</author>
      <description><![CDATA[Jerry,<br />
<br />
As regards HtmlKeyPress, that's my fault. This was first implemented so that it <br />
<br />
a) only works in Design (Edit) mode and<br />
b) only fires for Ctrl-... combinations (where ... stands for any key)<br />
<br />
You can change this easily. You need to modify the PreHandleEvent method. If you look at the block beginning:<br />
<br />
case ComSupport.DISPID_KEYPRESS:<br />
<br />
you'll see that InvokeHtmlKeyPress is only called for Ctrl combinations, and even then only when not one of the explicitly handled ones like Ctrl-C. We did this to support shortcut entry of particular HTML content. If you want it to fire on every keystroke, remove the call to InvokeHtmlKeyPress from within the <br />
<br />
if (pIEventObj.ctrlKey) <br />
<br />
block, and insert it after. <br />
<br />
I've modified the download to do this now.<br />
<br />
You can get MouseDown using a similar technique. In fact, in debug mode you'll see the MouseDown events written to the Debug window, from the same PreHandleEvent method. However I've not put in the plumbing to invoke an event; you could add this. You'll also find that UpdateUI fires on MouseDown. Again, this only works in Design mode.<br />
<br />
I've used an EditDesigner to get these events. The EditDesigner is powerful, but another reason to use it is to get around a bug/problem whereby the control stops responding to keystrokes when you hook up events to the HTMLDocument. The techniques I've used workaround this bug.<br />
<br />
Tim]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,174,177#msg-177</guid>
      <pubDate>Mon, 18 Nov 2002 08:02:00 +0000</pubDate>
    </item>
    <item>
      <title>Re: one dumb question</title>
      <link>http://www.itwriting.com/phorum/read.php?3,174,176#msg-176</link>
      <author>Jerry Dilfer</author>
      <description><![CDATA[I see.<br />
<br />
Can you give example of how the form can subscribe to an event in the control.  I've tried several events but can't seem to capture them.  What I tried:<br />
<br />
this.htmlEditor1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.testing);<br />
<br />
this.htmlEditor1.HtmlKeyPress += new onlyconnect.HtmlKeyPressHandler(this.testing2);<br />
---------<br />
public void testing(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
	MessageBox.Show(&quot;hello&quot;);<br />
}<br />
public void testing2(object sender, onlyconnect.HtmlKeyPressEventArgs e)<br />
{<br />
<br />
	MessageBox.Show(&quot;hello2&quot;);<br />
}]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,174,176#msg-176</guid>
      <pubDate>Mon, 18 Nov 2002 01:37:51 +0000</pubDate>
    </item>
    <item>
      <title>Re: one dumb question</title>
      <link>http://www.itwriting.com/phorum/read.php?3,174,175#msg-175</link>
      <author>Tim Anderson</author>
      <description><![CDATA[The interop stuff is necessary unless you have the time to go and write a native C# or VB.Net HTML parser and editor. Another way of looking at it is that by doing the interop stuff and wrapping it in managed code, it saves others the pain of having to deal with it.<br />
<br />
Tim]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,174,175#msg-175</guid>
      <pubDate>Sun, 17 Nov 2002 20:32:15 +0000</pubDate>
    </item>
    <item>
      <title>one dumb question</title>
      <link>http://www.itwriting.com/phorum/read.php?3,174,174#msg-174</link>
      <author>Jerry Dilfer</author>
      <description><![CDATA[The control looks very nice.  I'd like to work on enhancing it, but have no clue what all that unmanaged code does.  Is all the interop stuff neccessary to implement such a control?  Thanks.]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,174,174#msg-174</guid>
      <pubDate>Sun, 17 Nov 2002 15:28:13 +0000</pubDate>
    </item>
  </channel>
</rss>
