7

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.

RRUZ
  • 134,889
  • 20
  • 356
  • 483
Qosmo
  • 1,142
  • 5
  • 21
  • 31

2 Answers2

19

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.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
1

Drag and drop an imageList from the toolbox on the winform and add images to collection from property window. Add a tabcontrol and Set the TabControl.ImageList property. Set the ImageIndex property for each tab page. see example http://www.youtube.com/watch?v=D7E6xJyd6KM

  • Are you affiliated with that link? If so, you must disclose it in your post, [as per the faq's](http://stackoverflow.com/faq#promotion). Otherwise, it might be considered advertising which is prohibited. – Leigh Jun 29 '12 at 01:10