This is a migrated thread and some comments may be shown as answers.

Style of tabs in tabbed document

4 Answers 114 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Dudu
Top achievements
Rank 1
Dudu asked on 16 Jul 2013, 10:11 PM
Hi,
please is there any way to reach result attached in the second picture programatically ? The tab is aligned to bottom.

1) I would need to get close button to the right of the tab name
2) I would need to get rid of close button at one tab.

First picture describes current state. Second picture shows my wish.

Thanks

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 Jul 2013, 02:03 PM
Hello Dudu,

Thank you for writing.

For the time being, the tabs in the DocumentWindows of RadDock cannot be replaced, and having in mind that the layout of the tab is custom one, it is not possible to move the close button and also it is not possible to add another element in the tab. Since this seems a reasonable request, I am adding it in our 
Public Issue Tracking System. You can add your vote for it here: http://www.telerik.com/support/pits.aspx#/public/winforms/15384

I hope that you find this information useful.
 

Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Dudu
Top achievements
Rank 1
answered on 18 Jul 2013, 09:32 PM
Thank you,
i have one more question. In Visual Style Builder i have found button for adding new documents. How can i display him programatically, please? It is shown in enclosed picture.
0
Accepted
Stefan
Telerik team
answered on 23 Jul 2013, 09:45 AM
Hello,

You can do that by setting the NewItemVisibility property of the desired DocumentTabStrip. To handle newly created srtips which might get automatically created during a drag and drop operation, you can use the PageViewInstanceCreated event. Here is a small sample of this approach:
public partial class Form2 : Form
{
    public Form2()
    {
        InitializeComponent();
 
        this.documentTabStrip1.TabStripElement.NewItemVisibility = Telerik.WinControls.UI.StripViewNewItemVisibility.End;
 
        this.documentTabStrip1.TabStripElement.NewItem.Click += new EventHandler(NewItem_Click);
 
        this.radDock1.PageViewInstanceCreated += new PageViewInstanceCreatedEventHandler(radDock1_PageViewInstanceCreated);
    }
 
    void radDock1_PageViewInstanceCreated(object sender, PageViewInstanceCreatedEventArgs e)
    {
        RadPageViewStripElement strip = (RadPageViewStripElement)e.PageViewElement;
        strip.NewItemVisibility = StripViewNewItemVisibility.End;
        strip.NewItem.Click += new EventHandler(NewItem_Click);
    }
 
    void NewItem_Click(object sender, EventArgs e)
    {
        AddTab("New Tab " + DateTime.Now.TimeOfDay);
    }
 
    private void AddTab(string title)
    {
        RadLabel label = new RadLabel();
        label.Text = "label " + title;
        var f = new ToolWindow
        {
            Text = title,
        };
        f.Controls.Add(label);
 
        radDock1.SetWindowState(f, DockState.TabbedDocument);
    }
}

I hope this helps.
 

Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Dudu
Top achievements
Rank 1
answered on 24 Jul 2013, 06:01 AM
Hi,
yes it helped me very much. Thank you.
Tags
Dock
Asked by
Dudu
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Dudu
Top achievements
Rank 1
Share this question
or