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

Dock Tabbing

2 Answers 139 Views
Dock
This is a migrated thread and some comments may be shown as answers.
brucevb
Top achievements
Rank 1
brucevb asked on 28 Nov 2006, 10:00 AM

Hello,
Two questions:

1) How do you merge in code two dock panels so they are tabbed together?

2) Is it possible to assign a graphic to the Dock Tabs ? ( next service pack?)

Thanks!!

Bruce Van Buren

Hello,
Two questions:
 

2 Answers, 1 is accepted

Sort by
0
Dimitar Kapitanov
Telerik team
answered on 28 Nov 2006, 03:51 PM
Hello Bruce,

  1. There are no bitmaps at the moment that could be placed on the tabs, but this feature is to be introduced in Q4
  2. Here is a demo code snippet:

    // new dock panel
    DockPanel panel = new DockPanel();

    // we name the panel
    panel.Text =
    "Test1";

    //we dock the new panel using an existing docked panel as a pivot.
    dockingManager1.SetDock(panel, dockPanel1,
    DockPosition.Fill);
     
All the best,
Dimitar Kapitanov
the telerik team
0
Dimitar Kapitanov
Telerik team
answered on 28 Nov 2006, 05:08 PM
Hello Bruce,

Here's additional information regarding your question how to assign images to the tab items in r.a.d.dock.
You can try and use the following method to do so until we implement this feature in the next release.

void SetIcon(Bitmap img, DockPanel panel)
{
    DockPresenterControl presenterControl = panel.DefaultPresenter as DockPresenterControl;
    RadTabStripElement tabStripElement = (presenterControl.DockPresenterElement.Children[2].Children[2] as RadTabStripElement);
    foreach (DockableTab tab in tabStripElement.Items)
    {
        if (tab.Element == panel)
        {
            tab.Image = img;
            return;
        }
    }
}


where Bitmap img is the image you would like to set and DockPanel panel is a reference to the docked IDockable instance.

Kind regards,
Dimitar Kapitanov
the telerik team
Tags
Dock
Asked by
brucevb
Top achievements
Rank 1
Answers by
Dimitar Kapitanov
Telerik team
Share this question
or