1. 把tabcontrol 托到form 窗口
2.右击tabControl 添加tab
3.把imageList 控件托到form 窗口。
4.设置3中imageList的图片列表,xx.png
5.设置tabControl 的属性:imageList 成3中的imageList.
6.选中2中tabcontrol 的某一个tab, 设置listIndex或listKey.
7.done.
本文介绍了一种在Form窗体中使用TabControl并结合ImageList显示图标的方法。具体步骤包括将TabControl拖放到窗体上,添加Tab页,创建并设置ImageList以显示自定义图标等。
1. 把tabcontrol 托到form 窗口
2.右击tabControl 添加tab
3.把imageList 控件托到form 窗口。
4.设置3中imageList的图片列表,xx.png
5.设置tabControl 的属性:imageList 成3中的imageList.
6.选中2中tabcontrol 的某一个tab, 设置listIndex或listKey.
7.done.