开发者

How do you add an image to TabControl's label in Winforms?

How do you add a image to a tab label on a tab control?

Just like this:

How do you add an image to TabControl's label in Winforms?

But on a normal tab p开发者_运维百科age like this:

How do you add an image to TabControl's label in Winforms?

I understand to do this you need to a add a Imagelist and make a index of the images to be used but I haven't found any examples searching on google. Any help?


  1. Add an ImageList control to the form (this should be in the Toolbox). Add the images you want to the image list by going to the properties tab and set the Images property.

  2. Then go to the properties for the tab control; and in the ImageList property select the image list you created in the previous step, then in the TabPages property open up the Tab Page Collection Editor (by clicking the button) select a page, then you want to set the ImageIndex property to the index of the image from the image list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜