如何将图像放在按钮文本上
问题描述:
http://digiwaytech.com/customer.jpg
请参考此图片,让我知道如何将图像放在按钮文字上
Please Reply尽快
http://digiwaytech.com/customer.jpg
Kindly refer to this image and let me know how to place the image over the button text
Please Reply as soon as possible
答
如果你使用的是Windows Forms,你可能会看看如何:创建自定义图像按钮控件 [ ^ ]。
If you are using Windows Forms the you might have a look at "How to: Create a Custom Image Button Control"[^].
在设计师中:
1)将图像添加到按钮。
2)将ImageAlign属性设置为TopCenter
3)将TextAlign属性设置为BottomCenter
4)使按钮的大小合适以显示两者。
In the designer:
1) Add your Image to the button.
2) Set the ImageAlign property to TopCenter
3) Set the TextAlign property to BottomCenter
4) Make the button the right size to show both.
如果您使用的是Winform,请在表单上放置一个按钮。转到按钮向下滚动的属性,您可以看到图像。浏览并设置图像,然后再次向下滚动,您可以看到名为TextImageRelation的属性 - >单击组合框并选择ImageAboveText。
If you are using Winform, place a button on your form. Go to properties of your button scroll down you can see Image. Browse and set image and then scroll down again you can see a property named TextImageRelation --> Click combobox and select ImageAboveText.