[英]Use Linklabel image to get onclick event with out any text
I have an linklabel in C# winforms. 我在C#winforms中有一个linklabel。 It has no text but it has an image as background.
它没有文本,但是有图像作为背景。 Is there any way i can use the image as hyperlink to trigger the onclick event?
有什么方法可以将图像用作超链接来触发onclick事件?
I have searched a lot and all i could find was only text manipulations (like put the text to transparent..etc). 我已经搜索了很多,我所能找到的只是文本操作(例如将文本放到透明的..etc中)。 Is there a way around without actually using text?
有没有实际不使用文本的方法? Also if i can get a tooltip for linklabel.. it will be more helpful.
另外,如果我能获得linklabel的工具提示。
I hope this question is not too mainstream(i am new to C#). 我希望这个问题不太主流(我对C#还是陌生的)。
您可以将button
与其中的image
一起使用,并将其属性设置为FlatStyle:Flat
以使其具有ImageLink
的外观,或者使用PictureBox
和To Show Tooltip,可以使用Tooltip
工具在button
或PictureBox
调用新属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.