Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Dock as Tabbed Document programmatically (Read 1852 times)
MavinTech
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 19
Joined: Jul 30th, 2020
Dock as Tabbed Document programmatically
Nov 17th, 2020 at 2:49pm
Print Post  
Looking to mimic the functionality of "Dock as Tabbed Document" in code.  I am creating a new DockItem and can add it to a newly created TabbedDocument control, but I'd like to add it to an existing TabbedDocument control if one exists (creating one if necessary). 

Basically, I'd like to open up a bunch of DockItems and have them all be tabbed in the same window.

Also, if I can order them that would be helpful as well.

Thanks
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Dock as Tabbed Document programmatically
Reply #1 - Nov 18th, 2020 at 7:24am
Print Post  
Try this -

Code
Select All
TabbedDocument tabDoc = dockControl.Items
    .OfType<TabbedDocument>().FirstOrDefault();
if (tabDoc == null)
{
    tabDoc = new TabbedDocument();
    dockControl.Items.Add(tabDoc);
}
tabDoc.Items.Add(item); 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
MavinTech
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 19
Joined: Jul 30th, 2020
Re: Dock as Tabbed Document programmatically
Reply #2 - Dec 8th, 2020 at 3:14pm
Print Post  
Sorry for the delay in testing this.  Got side-tracked.

This solution worked perfectly for what I was looking to do.

Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint