Adding Tabbed Document

4 posts, 0 answers
  1. Lorenzo
    Lorenzo avatar
    17 posts
    Member since:
    Aug 2007

    Posted 17 Sep 2007 Link to this post

    Hi,
    I have one application with one docking manager that contains some dockPanels and some tabbed documents.
    I want to add a tabbed document (Telerik.WinControls.Docking.DocumentPane)
    via C# code... what is the best way to do this?

    Thanks for support
    Lorenzo
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 18 Sep 2007 Link to this post

    Hi Lorenzo,

    Thank you for contacting us.

    You can add a tabbed document using the codeblock below:

    DocumentPane docPane = new DocumentPane(); 
    docPane.Text = "Test Document"
    dockingManager1.SetDocument(docPane); 
     

    Hope this helps.

    Greetings,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Reid McClanahan
    Reid McClanahan avatar
    3 posts
    Member since:
    Jun 2007

    Posted 16 Jul 2008 Link to this post

    I want to add a tabbed document when a tree node is selected from another docked pane.  Do you have a code snippet that would help me associate the node to the tabbed document so that I dont keep generating new documents each time I click on the same tree node?
  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 18 Jul 2008 Link to this post

    Hi Reid,

    You can use Tag property of the tree view node item:

    private void radTreeView1_AfterSelect(object sender, RadTreeViewEventArgs e) 
        if (e.Node.Tag is DocumentPane) 
        { 
            ((DocumentPane)e.Node.Tag).Activate(); 
        } 
        else 
        { 
            DocumentPane document = new DocumentPane(); 
            document.Text = "My Document"
            this.dockingManager1.SetDocument(document); 
            e.Node.Tag = document; 
        } 

    I hope this helps. Please, don't hesitate to contact us if you have other questions.

    Best wishes,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top