<?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 : MDI tabbed docs and multiple docs</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : MDI tabbed docs and multiple docs]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 11:51:57 +0000</pubDate>
  <lastBuildDate>Tue, 14 Nov 2006 15:40:04 +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=5467</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[MDI tabbed docs and multiple docs : Excuse the links to the upload...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5467&amp;PID=17306&amp;title=mdi-tabbed-docs-and-multiple-docs#17306</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2493">AndyL</a><br /><strong>Subject:</strong> 5467<br /><strong>Posted:</strong> 14 November 2006 at 3:40pm<br /><br />Excuse the links to the upload file - I wondered where they had gone - ignore them from the code snippet]]>
   </description>
   <pubDate>Tue, 14 Nov 2006 15:40:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5467&amp;PID=17306&amp;title=mdi-tabbed-docs-and-multiple-docs#17306</guid>
  </item> 
  <item>
   <title><![CDATA[MDI tabbed docs and multiple docs :  Well the task wasn&amp;#039;t as...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5467&amp;PID=17305&amp;title=mdi-tabbed-docs-and-multiple-docs#17305</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2493">AndyL</a><br /><strong>Subject:</strong> 5467<br /><strong>Posted:</strong> 14 November 2006 at 3:38pm<br /><br /><p>Well the task wasn't as simple as I expected. The main problem revolved around the clash between EnableGroups() and ShowTabWorkspace. </p><div>I attach a variation of the c# sample "MDISample" with a menu option called "Show Document Tab". Selecting this will toggle tabbed view and multiple document view.</div><div>N.B. I cannot use EnableGroups() in this code - it stops ShowTabWorkspace from working.</div><div>&nbsp;</div><div>The key code is in a helper function</div><div><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: blue; font-family: 'Courier New';">#region</span><span style="font-size: 8pt; font-family: 'Courier New';"> Helper functions<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: blue; font-family: 'Courier New';">private</span><span style="font-size: 8pt; font-family: 'Courier New';"> <span style="color: blue;">void</span> ChangeDocType(<span style="color: blue;">bool</span> TabbedDocs)<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">{<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">m_TabbedDocs = TabbedDocs;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: blue; font-family: 'Courier New';">if</span><span style="font-size: 8pt; font-family: 'Courier New';"> (m_TabbedDocs == <span style="color: blue;">true</span>)<span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: green;">//tabbed document display<o:p></o:p></span></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">{<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp; </span>m_Workspace = CommandBars.ShowTabWorkspace(<span style="color: blue;">true</span>);<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;</span><span style="">&nbsp;</span>m_Workspace.Refresh();<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp; </span><span style="color: blue;">foreach</span> (<span style="color: teal;">Form</span> ctrl <span style="color: blue;">in</span> <span style="color: blue;">this</span>.MdiChildren)<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp; </span>{<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;</span>ctrl.FormBorderStyle = <span style="color: teal;">FormBorderStyle</span>.None;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp; </span><span style="">&nbsp;</span><span style="">&nbsp;</span>ctrl.WindowState =<a href="https://forum.codejock.com/uploads/20061114_153426_MDISample_2.zip" target="_blank"></a>&nbsp; System.Windows.Forms.<span style="color: teal;">FormWindowState</span>.Maximized;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp; </span>}<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp; </span><span style="color: blue;">foreach</span> (XtremeCommandBars.<span style="color: teal;">TabControlItem</span> tci <span style="color: blue;">in</span> CommandBars.TabWorkspace)<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp; </span>{<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;</span><span style="color: green;">//MessageBox.Show(tci.Caption + " : " + tci.Handle.ToString() + " : ");<o:p></o:p></span></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;</span><span style="color: green;">//need to loop through the tabs and select them so that the form is redisplayed correctly<o:p></o:p></span></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: green;">//in the tab.<o:p></o:p></span></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>m_Workspace.FindItem(tci.Handle).Selected = <span style="color: blue;">true</span>;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">}<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: blue; font-family: 'Courier New';">else</span><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: green;">//multi document display<o:p></o:p></span></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">{<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">m_Workspace = CommandBars.ShowTabWorkspace(<span style="color: blue;">false</span>);<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">m_Workspace.Refresh();<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: blue; font-family: 'Courier New';">foreach</span><span style="font-size: 8pt; font-family: 'Courier New';"> (<span style="color: teal;">Form</span> ctrl <span style="color: blue;">in</span> <span style="color: blue;">this</span>.MdiChildren)<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">{<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp; </span><span style="">&nbsp;</span><span style="color: green;">//making the form invisible and then visible makes sure that it is redrawn correctly.<o:p></o:p></span></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp; </span><span style="">&nbsp;</span><span style="color: green;">//N.B. make sure that the form is not set to AutoSize<o:p></o:p></span></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>ctrl.Visible = <span style="color: blue;">false</span>;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>ctrl.AutoSize = <span style="color: blue;">false</span>;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>ctrl.FormBorderStyle = <span style="color: teal;">FormBorderStyle</span>.Sizable;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>ctrl.StartPosition = <span style="color: teal;">FormStartPosition</span>.CenterParent;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>ctrl.WindowState = System.Windows.Forms.<span style="color: teal;">FormWindowState</span>.Normal;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>ctrl.Visible = <span style="color: blue;">true</span>;<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">}<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: blue; font-family: 'Courier New';">this</span><span style="font-size: 8pt; font-family: 'Courier New';">.LayoutMdi(<span style="color: teal;">MdiLayout</span>.Cascade);<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">}<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; font-family: 'Courier New';">}<o:p></o:p></span></p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: blue; font-family: 'Courier New';">#endregion</span><span style="font-size: 8pt; font-family: 'Courier New';" lang="EN-GB"><o:p></o:p></span></p></div><div>Hope this helps someone<br><br></div><div>&nbsp;<span style="font-size: 8pt; font-family: 'Courier New';"><a href="uploads/20061114_153426_MDISample_2.zip" target="_blank">uploads/20061114_153426_MDISample_2.zip</a><a href="uploads/20061114_153625_MDISample_2.zip" target="_blank">uploads/20061114_153625_MDISample_2.zip</a></span></div><div><span style="font-size: 8pt; color: blue; font-family: 'Courier New';"></span></div>]]>
   </description>
   <pubDate>Tue, 14 Nov 2006 15:38:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5467&amp;PID=17305&amp;title=mdi-tabbed-docs-and-multiple-docs#17305</guid>
  </item> 
  <item>
   <title><![CDATA[MDI tabbed docs and multiple docs : I am writing an MDI application...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5467&amp;PID=17157&amp;title=mdi-tabbed-docs-and-multiple-docs#17157</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2493">AndyL</a><br /><strong>Subject:</strong> 5467<br /><strong>Posted:</strong> 08 November 2006 at 12:48pm<br /><br />I am writing an MDI application and using CJ CommandBars for the first time. <DIV>I would like to emulate the Visual Studio options of flicking from&nbsp; a "Tabbed documents" to"Multiple documents" representation of the Child forms.</DIV><DIV>&nbsp;</DIV><DIV>I think that the logic that I need is as follows.</DIV><DIV>If "Multiple Doc mode" selected then identify&nbsp;each tab and pick up each form, turn each form FontBordersStyle to "sizeable", remove the tabs from the CommandBar and redisplay the forms as standard MDI Child windows and cascade them in the parent form.</DIV><DIV>&nbsp;</DIV><DIV>If "Tabbed doc selected" then identify all the open forms, turn off their FontBorderStyle, add correct number of tabs to the commandbar and load each form onto the tab.</DIV><DIV>&nbsp;</DIV><DIV>Being a Newbie to CJ I am not sure where to start. I have the "tabbed" look working OK. Can anyone advise on what objects and methods I should be using to attempt this?</DIV><DIV>If anyone can provide code snippets that would be greatly appreciated.</DIV><DIV>&nbsp;</DIV><DIV>Thank you. Andy.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 08 Nov 2006 12:48:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5467&amp;PID=17157&amp;title=mdi-tabbed-docs-and-multiple-docs#17157</guid>
  </item> 
 </channel>
</rss>