Next and Previous button

9 posts, 0 answers
  1. Nguyen
    Nguyen avatar
    6 posts
    Member since:
    Jul 2012

    Posted 18 Jul 2012 Link to this post

    Hi Telerik,

    I'm trying to use RadDock in Your Demos and i have a problem:
    When I add alot of documents ( such as 20 docs), the main screen only show 10 documents and i must click to OverlowDropdownButton on the right to know all document opened.

    I wants to ask:
    1. How to show Next and Previous Button beside OverflowDropdownButton
    2. How to know that having other documents opened but not display in main screen (without click on OverflowDropdownButton)
    3. How can i change Tabbed Style of Document Manager (ex: VS 2010, VS 2008, Office 2007, Office 2003,...)

    My screen captured in attack file.

    Thanks in advance!
  2. Nguyen
    Nguyen avatar
    6 posts
    Member since:
    Jul 2012

    Posted 18 Jul 2012 Link to this post

    Some one help me, plz...
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 20 Jul 2012 Link to this post

    Hi Nguyen,

    Thank you for contacting us.

    Let me get straight to the questions at hand:

    1. The following snippet demonstrates how to display the left/right scroll buttons:
    DocumentTabStrip tabStrip = this.radDock1.GetDefaultDocumentTabStrip(false);
    tabStrip.TabStripElement.StripButtons = Telerik.WinControls.UI.StripViewButtons.Scroll;
    tabStrip.RootElement.Children[0].Children[3].Margin = new Padding(0, 4, 0, 0);

    2. You can get the document windows which are not currently displayed through comparing the ControlBoundingRectangle properties of the TabItem and the TabStrip. Here is a sample snippet:
    List<RadPageViewItem> hiddenDocuments = new List<RadPageViewItem>();
    foreach (RadPageViewItem item in tabStrip.TabStripElement.Items)
    {
        if (item.ControlBoundingRectangle.X < tabStrip.TabStripElement.ItemContainer.ControlBoundingRectangle.X ||
            item.ControlBoundingRectangle.Right > tabStrip.TabStripElement.ItemContainer.ButtonsPanel.ControlBoundingRectangle.Left)
        {
            hiddenDocuments.Add(item);
        }
    }

    3. RadDock does not have a predefined styles that match exactly the styles you have mentioned. Our suite comprises predefined themes and each of these uses a unique combination of colors, shapes and effects. This help article illustrates in details how to use our default themes.

    If you would like to introduce small changes to the tabs, e.g. change their shape and spacing, you can set these at run-time. For example, the following piece of code makes the tabs rectangular:
    RoundRectShape shape = new RoundRectShape();
    shape.Radius = 0;
     
    foreach (RadPageViewItem item in tabStrip.TabStripElement.Items)
    {
        item.Shape = shape;   
    }
     
    tabStrip.TabStripElement.ItemSpacing = 5;

    All of the snippets above have been included in the attached sample project. Please have a look at it and let me know whether it fits your requirements.

    I hope my answer is helpful. Let me know if you have further queries.

    All the best,
    Boryana
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  5. Nguyen
    Nguyen avatar
    6 posts
    Member since:
    Jul 2012

    Posted 22 Jul 2012 Link to this post

    Thanks for your help,
    I will try now and feedback later.
    Thank telerik.
  6. Nguyen
    Nguyen avatar
    6 posts
    Member since:
    Jul 2012

    Posted 22 Jul 2012 Link to this post

    Thanks for your help again,

    Great, that's exactly what i need.
    But there's a other problem: When i click to OverflowDropdowButton to show all document opened, it don't check on current active document.
    What option do that?

    Thanks!
  7. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 23 Jul 2012 Link to this post

    Hello Nguyen,

    Thank you for writing.

    You can use the default PageView overflow button, which displays a checkmark next to the selected item by default. You will need to hide the DockLayoutPanel containing the Dock's overflow and close buttons, and reset the Padding of the StripViewItemContainer. Here is a sample snippet:
    //1. Show Next and Previous Buttons
    tabStrip = this.radDock1.GetDefaultDocumentTabStrip(false);
    tabStrip.TabStripElement.StripButtons = StripViewButtons.All;
    DockLayoutPanel dockPanel = tabStrip.RootElement.Children[0].Children[3] as DockLayoutPanel;
    if(dockPanel != null)   
    {
        dockPanel.MaxSize = new System.Drawing.Size(1, 1);
    }
    StripViewItemContainer stripContainer = tabStrip.TabStripElement.Children[0] as StripViewItemContainer;
    if (stripContainer != null)
    {
        stripContainer.Padding = new Padding(stripContainer.Padding.Left, stripContainer.Padding.Top, 0, stripContainer.Padding.Bottom);
    }

    I hope this helps. Let me know if you have further questions.

    All the best,
    Boryana
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  8. Nguyen
    Nguyen avatar
    6 posts
    Member since:
    Jul 2012

    Posted 24 Jul 2012 Link to this post

    Thanks you very much,

    I used your code, and it runs OK.
    But when i splits screen into more than one dock zone, it's only OK with first dock screen.
    Please view my attack image.

    Sorry if I asked too much.
    Regards,
  9. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 26 Jul 2012 Link to this post

    Hello Nguyen,

    Thank you for writing back.

    I have modified the sample project, so that now each DocumentTabStrip contains the same buttons regardless of the way you reorganize the DocumentWindows.

    I hope this helps. Let me know if you have further queries. 

    All the best,
    Boryana
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  10. Nguyen
    Nguyen avatar
    6 posts
    Member since:
    Jul 2012

    Posted 29 Jul 2012 Link to this post

    Hi Telerik,

    That's exactly all i need.

    Thanks you very much!
Back to Top
UI for WinForms is Visual Studio 2017 Ready