LinkLabel不带下划线-紧凑型框架 [英] LinkLabel no underline - Compact Framework
本文介绍了LinkLabel不带下划线-紧凑型框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Microsoft Compact Framework开发Windows CE应用程序。我必须使用LinkLabel,并且必须为白色且没有下划线。
I am developing a Windows CE app with Microsoft Compact Framework. I have to use a LinkLabel and it has to be white and no underline.
因此,在设计器中,我通过白色修改了字体颜色,并且未选中字体中的下划线对话框。
So in the designer, I modified font color by white and unchecked "underline" in the font dialog.
但是,当我运行该应用程序时,字体仍然是蓝色且带有下划线。
However, when I run the application, the font is still blue and underlined.
是否可以删除LinkLabel的下划线并更改其颜色?
Is there a way to remove the underline of a LinkLabel and change its color?
推荐答案
在设计时不会在设计器中可见 ,但在运行时将是正确的。
否则,请在代码中执行(应与设计者代码相同):
Otherwise do it in Code (which should be the same as the designers code):
Font f = LinkLabel1.Font;
LinkLabel1.Font = New Font(f, f.Style && !FontStyle.Underline)
这篇关于LinkLabel不带下划线-紧凑型框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文