giovedì 22 febbraio 2007 22:52
Is There a way to remove the underline of LinkLabel control on Compact Framework 2.0 (Smartphone) ?
I need to create more buttons on screen but this links can't be with underline and, when I click on one of this buttons, preserve the color.
Tutte le risposte
martedì 27 febbraio 2007 21:54
To remove the underline from a LinkLabel control
- Select Font in the Properties list
- Click the ... button to display the Font dialog
- Uncheck Underline in the Font dialog
- Click OK
Note that the designer will still display the label underlined, but it won't be at runtime.
You can set the color of the LinkLabel via the ForeColor property.
mercoledì 28 febbraio 2007 23:59
Thanks for your help.
I don't see this option when I was built my Form
But, I have another question.
I am panting a JPG file on Form backgroung using OnPaint form event.
How can I set, on the LinkLabel, the background color to be transparent?
giovedì 1 marzo 2007 18:23
The standard compact framework controls doesn't support transparency. Even if you set the BackColor color to Web/Transparent, the framework cheats and sets the BackColor to that of the controls parent.
sabato 3 marzo 2007 06:24
I'm not clear about whether you were able to remove the underline from the LinkLabel or not?
CF controls don't support transparent backgrounds. However, I believe that you could write a custom control with a transparent background using alphablending. See Chris Lorton's article Alphablending with NETCF for more detail on alphablending. The LinkLabel control simply draws its text in its client area and responds to the Click event. Alex Yakhnin's article How to Create a Microsoft .NET Compact Framework-based Image Button is a good intro to creating custom controls.
lunedì 26 maggio 2008 06:19Hi Dan,
I am trying to create an application in VB .NET for Windows CE 5.0 where user could click on the label, since CF label does not support on click event, i was suggested to use LinkLabel...but when i remove the underline from the linklabel no text is shown....I just figured out that even if I don't remove the underline no text is shown. In linklabel properties is under Text ="Linklabel1"
I tried to create my own custom control which would support backcolor, textalignment and on click event but I am not that good yet .
thanks for help
sabato 14 aprile 2012 06:01linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;