在的TabControl C#中的图标 - 如何? [英] Icons in TabControl C# - How?

查看:182
本文介绍了在的TabControl C#中的图标 - 如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法找到这个随时随地的答案。
上的默认的TabControl选项卡就能满足我的需要在标签前的图标。

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.

在此先感谢。

问:您需要澄清您所使用的库设置:的WinForms,WPF,ASP.Net,GTK#等 - 弥敦道恩斯特

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

答:你是完全正确的,我的错误。我使用的WinForms。我转向从WPF回来,因为WPF在某些计算机崩溃。

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

推荐答案

这是一个内置的TabControl的功能。在表单上放一个ImageList,并与你的图标填充它。设置TabControl.ImageList财产。对于每一个标签页,设置ImageIndex属性。

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.

这篇关于在的TabControl C#中的图标 - 如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆