RadDock Tabs

6 posts, 1 answers
  1. Rui Silva
    Rui Silva avatar
    16 posts
    Member since:
    Dec 2009

    Posted 23 Feb 2011 Link to this post

    Good morning, i am having an odd problem when adding documentwindows to my radDock.
    When i add a new tab, the tab allways open in the first position(left) of the first tab of my raddock, i have tried to change the position from "InFront" to "OnBack" but nothing changes. I use the radDock.AddDocument(documentWindow) method.

    I want to know how i can make my tabs to open in the last position of the tabcontainer in my raddock instead of the first position.

    Hope you can help me, best regards
    Rui Silva
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 23 Feb 2011 Link to this post

    Hello,

    The following code will insert the second document to the right of the first document.

    this.radDock1.DocumentManager.DocumentInsertOrder = DockWindowInsertOrder.ToBack;
    DocumentWindow documentTop = new DocumentWindow();
    documentTop.Text = "New Document 1";
    this.radDock1.AddDocument(documentTop);
    DocumentWindow documentTop2 = new DocumentWindow();
    documentTop2.Text = "New Document 2";
    this.radDock1.AddDocument(documentTop2);

    hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Rui Silva
    Rui Silva avatar
    16 posts
    Member since:
    Dec 2009

    Posted 23 Feb 2011 Link to this post

    Richard thanks for the quick answer, but as i described in the first post i have already tried that but it keeps inserting the document in the left of the first document...
    Is there anything else that i can be doing wrong?
    Best regards,
    Rui SIlva
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 23 Feb 2011 Link to this post

    Hello,

    If you haven't, please can yuo try the code provided in a new project with just a RadDock on a form. I found under the latest version of the RadControls (2010 Q3 SP1) this worked as expected.
    Let me know how you get on
    Thanks
    Richard
  6. Rui Silva
    Rui Silva avatar
    16 posts
    Member since:
    Dec 2009

    Posted 23 Feb 2011 Link to this post

    Thanks very much Richard and i apologize, as that code worked in a new project i realized i was messing with other setting wich was resetting the option of opening in back.

    Thanks for your help!
    Best regards, Rui SIlva
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 23 Feb 2011 Link to this post

    No problem. Glad that it helped you.
    Regards,
    Richard
Back to Top
UI for WinForms is Visual Studio 2017 Ready