<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Help with LoadStateFromString</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Help with LoadStateFromString]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 09:31:33 +0000</pubDate>
  <lastBuildDate>Thu, 13 Jan 2005 13:14:44 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=1639</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Help with LoadStateFromString : In the saved layout do you have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1639&amp;PID=4726&amp;title=help-with-loadstatefromstring#4726</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 1639<br /><strong>Posted:</strong> 13 January 2005 at 1:14pm<br /><br />In the saved layout do you have a popup with Id = ID_ASSIGNPOPUP?]]>
   </description>
   <pubDate>Thu, 13 Jan 2005 13:14:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1639&amp;PID=4726&amp;title=help-with-loadstatefromstring#4726</guid>
  </item> 
  <item>
   <title><![CDATA[Help with LoadStateFromString : When I call FindControl as outlined...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1639&amp;PID=4723&amp;title=help-with-loadstatefromstring#4723</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=927">JoshV</a><br /><strong>Subject:</strong> 1639<br /><strong>Posted:</strong> 13 January 2005 at 11:24am<br /><br /><P>When I call FindControl as outlined above, it sets ToolBarAssignmentPopup to Nothing.</P><P>If I just reference the object variable without setting it in the FindControl call, it is not Nothing (ie ToolbarAssignmentPopup is Nothing = False).&nbsp; This object reference (ToolbarAssignmentPopup) allows me to call ToolbarAssignmentPopup.CommandBar.Control.DeleteAll etc, without generating an error, but they have no effect on the screen.</P><P>If I don't call LoadStateFromString in the code segment you gave above, the FindControl works without a problem and returns a reference to the control that I want.&nbsp; That would be fine, except I need the toolbar positioning that I can only get from LoadStateFromString.</P>]]>
   </description>
   <pubDate>Thu, 13 Jan 2005 11:24:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1639&amp;PID=4723&amp;title=help-with-loadstatefromstring#4723</guid>
  </item> 
  <item>
   <title><![CDATA[Help with LoadStateFromString : First make sure that ToolBarAssignmentPopup...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1639&amp;PID=4665&amp;title=help-with-loadstatefromstring#4665</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 1639<br /><strong>Posted:</strong> 10 January 2005 at 7:17am<br /><br />First make sure that ToolBarAssignmentPopup&nbsp;  was added to the toolbar before the layout was saved.<br><br>Try:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;   CommandBars.LoadStateFromString<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Set ToolBarAssignmentPopup  =CommandBars.ActiveMenuBar.FindControl(xtpControlSplitButt onPopup,ID_ASSIGNPOPUP, ,TRUE)<br>&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  With ToolBarAssignmentPopup .CommandBar.Controls<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; .Add xtpControlBut ton, 100, 'D'<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; .Add xtpControlBut ton, 101, 'E'<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; .Add xtpControlBut ton, 102, 'F'<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;  End With<br>&nbsp;&nbsp;&nbsp; <br><span style="font-size:10px"><br /><br />Edited by SuperMario</span>]]>
   </description>
   <pubDate>Mon, 10 Jan 2005 07:17:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1639&amp;PID=4665&amp;title=help-with-loadstatefromstring#4665</guid>
  </item> 
  <item>
   <title><![CDATA[Help with LoadStateFromString : I have several dynamic toolbars...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1639&amp;PID=4656&amp;title=help-with-loadstatefromstring#4656</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=927">JoshV</a><br /><strong>Subject:</strong> 1639<br /><strong>Posted:</strong> 09 January 2005 at 5:57pm<br /><br /><P>I have several dynamic toolbars with dropdown lists (xtpControlSplitButtonPopup) that change based upon the type of&nbsp; 'document' that a user has opened.&nbsp; For example, I want to display 3 control buttons with 'A', 'B', and 'C' one time a user logs in and I want it to be 'D', 'E', and 'F' on the next login. </P><P>I'm fine loading these programically, but as soon as I use LoadStateFromString to try to restore the last position of each of the application's toolbars, I run into problems.&nbsp; My dropdown lists no longer contain the values I programitacally load.&nbsp; Instead they show the content of the lists as they were when I last called SaveStateToString.&nbsp; </P><P>I can see where that&nbsp;might make sense, but when I try delete these list items and re-add them with the correct items, the control doesn't update on the screen.&nbsp; If I had 'A', 'B', and 'C' showing the last time I called SaveStateToString and then run code such as:</P><P>-------------------</P><P>Public ToolbarAssignment As CommandBar<BR>Public ToolbatAssignmentPopup As CommandBarPopup</P><P>-------------------</P><P><BR>Set ToolbarAssignment = CommandBars1.Add("Assignment", xtpBarTop)<BR>With ToolbarAssignment.Controls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; Set ToolBarAssignmentPopup = .Add(xtpControlSplitButtonPopup, 0, "Assignments")<BR>&nbsp;&nbsp; ToolBarAssignmentPopup.ID = ID_ASSIGNPOPUP</P><P>End With</P><P> CommandBars1.LoadStateFromString&nbsp;&nbsp;&nbsp;&nbsp;&nbs p; </P><P>ToolBarAssignmentPopup.CommandBar.Controls.DeleteAll<BR> ToolBarAssignmentPopup.CommandBar.Controls.Add(xtpControlBut ton, 100, 'D')<BR> ToolBarAssignmentPopup.CommandBar.Controls.Add(xtpControlBut ton, 101, 'E')<BR> ToolBarAssignmentPopup.CommandBar.Controls.Add(xtpControlBut ton, 102, 'F')</P><P>---------------------</P><P><BR>After this, the control still shows 'A', 'B', and 'C'&nbsp; When I access the ToolBarAssignmentPopup buttons through code, I correctly see 'D', 'E', and 'F'.&nbsp; Do I need to do something to force the control to repaint or refresh?&nbsp; Does my variable ToolBarAssignmentPopup no longer reference the same node in the commandbar after calling LoadStateFromString?</P><P>Thanks.</P>]]>
   </description>
   <pubDate>Sun, 09 Jan 2005 17:57:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1639&amp;PID=4656&amp;title=help-with-loadstatefromstring#4656</guid>
  </item> 
 </channel>
</rss>