Datagrid视图按钮图像 [英] Datagrid view button image
本文介绍了Datagrid视图按钮图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的数据网格视图上有一个按钮列。请告知如何在该按钮上显示图像?
谢谢
Hi,
I have a button column on my datagrid view. Please advise how to show an image on that button?
Thanks
推荐答案
寻找类似的东西:WinForm ImageButton [ ^ ]
或者想要做类似的事情(不太确定,但它会像下面这样):
Seeking for something like this: WinForm ImageButton[^]
OR want to do something like (not too sure but it would be something like below):
Dim img As Image = Image.FromFile("someimage.png")
myButton.Image = img
' OR
myButton.Image = New Bitmap("Summers.jpg")
查看来自的回复Kira Qian在这里: http://social.msdn。 microsoft.com/Forums/en-US/winformsdatacontrols/thread/eb9dee12-dbb9-42c8-bbe2-be8f17da044e [ ^ ]
你最有可能需要先将图像缩放到按钮大小。
See the response from Kira Qian here: http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/eb9dee12-dbb9-42c8-bbe2-be8f17da044e[^]
You will most likely need to scale the image to the button size first.
这篇关于Datagrid视图按钮图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文