<?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>Fri, 06 Apr 2007 10:52:20 +0100</pubDate>
    <lastBuildDate>Fri, 06 Apr 2007 10:52:20 +0100</lastBuildDate>
    <category>HtmlEditor</category>
    <generator>Phorum 5.1.25</generator>
    <ttl>60</ttl>
    <item>
      <title>Re: how to avoid the automatic Focus after a document load</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3563,3959#msg-3959</link>
      <author>Tyrone Hopes</author>
      <description><![CDATA[Hi All<br />
Manitra mentioned that one problem associated with the taking focus is that the tree view loses focus.  I have written something very similar, and I had this problem as well, but is fixed by entering some code in the treeview.Afterselect event.  Use this code to allow the tree node to be greyed (like Microsoft Windows Explorer nodes when focus is removed):<br />
<br />
Dim tvsn As TreeNode = treeview.SelectedNode<br />
tvsn = tvWebsite.SelectedNode<br />
tvsn.Checked = True<br />
tvsn.BackColor = tvsn.BackColor.LightGray<br />
<br />
The effect of this that the tree view node stays highlighted in grey.  You can then change the colours back when you move to another node, <br />
Hope it helps<br />
Cheers<br />
Tyrone]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3563,3959#msg-3959</guid>
      <pubDate>Fri, 06 Apr 2007 10:52:20 +0100</pubDate>
    </item>
    <item>
      <title>Re: [SOLVED] how to avoid the automatic Focus after a document load</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3563,3958#msg-3958</link>
      <author>Manitra</author>
      <description><![CDATA[Hi,<br />
<br />
I found a work around (&quot;myEditor&quot; is the reference to the editor instance) : <br />
<br />
1) Catch the ReadyStateChanged event with this method<br />
private void DescriptionTxt_ReadyStateChanged(object sender, onlyconnect.ReadyStateChangedEventArgs e)<br />
        {<br />
            if (e.ReadyState == &quot;complete&quot;)<br />
            {<br />
                myEditor.IsActivationEnabled = true;<br />
            }<br />
        }<br />
<br />
2) As tim said : put in read only : <br />
myEditor.IsActivationEnabled = false;<br />
<br />
<br />
3) Load the document :<br />
myEditor.LoadDocument(&quot;this is some &lt;b&gt;html&lt;/b&gt; content&quot;);<br />
<br />
that's all folk :)<br />
<br />
Thanks for the readonly trick Tim :)]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3563,3958#msg-3958</guid>
      <pubDate>Thu, 05 Apr 2007 14:40:33 +0100</pubDate>
    </item>
    <item>
      <title>Re: how to avoid the automatic Focus after a document load</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3563,3957#msg-3957</link>
      <author>Manitra</author>
      <description><![CDATA[Hi,<br />
<br />
Thanks for your answer. Indeed its ok for a read only app. But my scenario is a read/write app that is supposed to manage some remote data.<br />
<br />
Here is a screen shoot to better explain my scenario : http://manitra.andria.free.fr/public/myscenario.png<br />
<br />
Well the idea is that, I have a tree view containing a list or articles. When the user selects a node, the &quot;detailed view&quot; is filled with the selected node info. Then, the user can edit the content and press the save button. <br />
<br />
The focus problem comes when the user uses the keyboad to browse the article list : the treeview looses the focus after each node change because the html editor receives new content and btw takes the focus. Even if the user uses the mouse it is annoying since he doesn't see the selected node (the treeview does not high light its selected node when it does not have the focus).<br />
<br />
Btw, I tried to search with the keyword &quot;focus&quot; and got no answer, that's why I created this topic.<br />
<br />
Thanks again for you help.]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3563,3957#msg-3957</guid>
      <pubDate>Wed, 04 Apr 2007 16:08:12 +0100</pubDate>
    </item>
    <item>
      <title>Re: how to avoid the automatic Focus after a document load</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3563,3954#msg-3954</link>
      <author>Tim</author>
      <description><![CDATA[You can easily prevent this if you make it read-only. Are you using the latest version? If you search this forum you will find much discussion on this subject; the latest version is better behaved than earlier ones.<br />
<br />
Tim]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3563,3954#msg-3954</guid>
      <pubDate>Sun, 01 Apr 2007 22:07:44 +0100</pubDate>
    </item>
    <item>
      <title>Re: how to avoid the automatic Focus after a document load</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3563,3564#msg-3564</link>
      <author>manitra</author>
      <description><![CDATA[Correction :<br />
<br />
the html editor ... automatically &quot;take&quot; the focus.]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3563,3564#msg-3564</guid>
      <pubDate>Wed, 28 Mar 2007 15:12:03 +0100</pubDate>
    </item>
    <item>
      <title>how to avoid the automatic Focus after a document load</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3563,3563#msg-3563</link>
      <author>manitra</author>
      <description><![CDATA[Hi,<br />
<br />
Each time I call the LoadDocument() method, the HtmlEditor automatically &quot;grap&quot; the focus.<br />
<br />
This is really annoying if you're browsing a list or treeview with the keybord and for each item, call LoadDocument.<br />
<br />
Does anyone know a workaround to avoid this behaviour ?<br />
<br />
May be, disable/hide  the control before calling LoadDocument()]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3563,3563#msg-3563</guid>
      <pubDate>Wed, 28 Mar 2007 10:24:19 +0100</pubDate>
    </item>
  </channel>
</rss>
