TabControl C# 中的图标 - 如何实现?

发布于 2024-09-18 03:30:07 字数 240 浏览 5 评论 0原文

我似乎无法在任何地方找到这个问题的答案。 默认选项卡控件选项卡上的标签之前的图标就足以满足我的需求。

提前致谢。

问:您需要澄清您正在使用的库集:Winforms、WPF、ASP.Net、GTK# 等。 – Nathan Ernst

答:您完全正确,我的错误。我正在使用Winform。我从 WPF 切换回来,因为 WPF 在某些计算机上崩溃了。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

久夏青 2024-09-25 03:30:07

它是 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.

银河中√捞星星 2024-09-25 03:30:07

从 winform 的工具箱中拖放 imageList,然后从属性窗口将图像添加到集合中。添加选项卡控件并设置 TabControl.ImageList 属性。设置每个选项卡页的 ImageIndex 属性。请参阅示例 http://www.youtube.com/watch?v=D7E6xJyd6KM

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文