开发者

How to put underline under button name

I have button with name "itemname", and now I want to put underline 开发者_如何转开发just under character "i" in "itemname", but I don't know how I should do this. Could anyone please tell me how?


You need to use an ampersand character (&) to do that:

yourButton.Text = "&itemname";

See http://msdn.microsoft.com/en-us/library/az5a73z1.aspx.


You should add an "&" to left of the letter you want to underline. So, a button with text "&itemname" will have the "i" underlined.


Do you mean you want Alt+I to click the button?

Have you tried changing the label text from itemname to &itemname?


You should add an "&" to left of the letter you want to underline. So, a button with text "&itemname" will have the "i" underlined. and you can get focused to the button by pressing "alt+i"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜