Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Icons in TabControl C# - How?

I can't seem to find an answer for this anywhere. An icon before the label on the default tabcontrol tabs would suffice for my needs.

Thanks in advance.

Q: You need to clarify what library set you're using: Winforms, WPF, ASP.Net, GTK#, etc. – Nathan Ernst

A: You are totally right, my mistake. I'm using Winforms. I switched back from WPF, since WPF was crashing in some computers.

like image 396
Qosmo Avatar asked Sep 08 '10 00:09

Qosmo


1 Answers

It is a built-in feature of the TabControl. Drop an ImageList on the form and fill it with your icons. Set the TabControl.ImageList property. For each tab page, set the ImageIndex property.

like image 58
Hans Passant Avatar answered Sep 28 '22 03:09

Hans Passant