How to add different Icons to MDI Tabs
27 Sep 2018 / 1 minute to read
This can be done programmatically using the below code snippet.
// Derive CustomTabbedMDIManager class from TabbedMDIManager
// to expose the internal TabControlAdv.
// Override the MDITabPanel code function.
this.MdiTabPanel = tabPanel;
// Add the images to the Image List.
TabControlAdv tabcontrol = this.tabbedMdiManager.GetMdiTabPanel() as TabControlAdv;
tabcontrol.ImageList = this.imageList1;
// Assign the images to the child tabs.
foreach (TabPageAdv page in tabcontrol.TabPages)
{
page.ImageIndex = index;
index++;
}
' Derive CustomTabbedMDIManager class from TabbedMDIManager
' to expose the internal TabControlAdv.
' Override the MDITabPanel code function.
Me.MdiTabPanel = tabPanel
' Add the images to the Image List.
Dim tabcontrol As TabControlAdv = CType(IIf(TypeOf Me.tabbedMdiManager.GetMdiTabPanel() Is TabControlAdv,
Me.tabbedMdiManager.GetMdiTabPanel(), Nothing), TabControlAdv)
tabcontrol.ImageList = Me.imageList1
' Assign the images to the child tabs.
For Each page As TabPageAdv In tabcontrol.TabPages
page.ImageIndex = index
index += 1
Next page
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page