在C#中使用制表符控件 [英] using tab control in c#
本文介绍了在C#中使用制表符控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在标签控件的每个标签页中使用图片.我将如何使用?
请给我解决方法.
谢谢.
Hi,
i want to use image in each tabpage in tab control.How will i use?
Please give me solution.
Thank you.
推荐答案
PictureBox?
PictureBox?
myPictureBox.Image = Image.FromFile(path);
OnPaint?
OnPaint?
e.Graphics.DrawImage(myImage, new Point(0,0));
这取决于您在做什么:从哪里获取信息,在设计时还是在运行时创建页面?
您实际上想实现什么?
It depends on what you are doing: Where you are getting info from, do you create your pages at design time, or run time?
What are you actually trying to achieve?
您必须将一个ImageList分配给TabControl,并给每个TabPage和ImageKey或ImageIndex.
TabControl.ImageList [
You have to assign a ImageList to the TabControl and give each TabPage and ImageKey or ImageIndex.
TabControl.ImageList[^]
这篇关于在C#中使用制表符控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文