linklabel

How to have a LinkClicked event using an ArrayList of LinkLabels in .NET

I'm working on a form that will display links to open different types of reports. This system has different types of users, so the users should only be able to see the links to the types of reports they can access. Currently, the way I have this set up is that I have an ArrayList of LinkLabels, but the problem I'm having is how to have...

Argument exception - parameter is not valid ( LinkLabel on WinForm )

Hi, I wrote a Win Forms app to test how a LinkLabel class works. It appears to be fine until I click on the changed LinkLabel. The Form1.cs code is below: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.For...

WPF LinkLabel implementation strategy

I am attempting to create a LinkLabel control for WPF. Essentially, I'm going to create the LinkLabel from a TextBlock and handle MouseEnter, MouseLeave, and MouseLeftButtonUp events. In the back end I have a base class that has properties that you would expect to see with a LinkLabel. With most other clickable controls in WPF, there is ...

How do I make a TLinkLabel work in Delphi?

I put a TLinkLabel on my form, filled it in with a caption including a valid HTML link, and got some nice blue underlined text. When I ran the program, I expected it to invoke Firefox (my default browser) and open the link automatically. Apparently that's not the case. The helpfile says I have to code this in an OnLinkClick event hand...

Using keyboard shortcuts with LinkLabel controls

I've noticed that keyboard-shortcuts assigned to linklabel controls in standard .NET WinForms forms are not functioning. I have created a LinkLabel control instance and assigned the Text property to be "Select &All". For most controls (label, button, radio button, etc) this would cause Alt-A to become the designated keyboard shortcut to...

LinkLabel needing more space than TextRenderer.MeasureText says

If I give TextRenderer.MeasureText some text to measure and width to use it will return the height needed to display that text. private static int CalculateHeight(string text, Font font, int width) { Size size = TextRenderer.MeasureText(text, font, new Size(width, Int32.MaxValue), TextFormatFlags.NoClipping | TextFormatFlags.WordBre...

Unhandled exception when Linklabel is clicked C# Winform

Hello everyone. I am getting a strange unhandled exception when I click the linklabel which should open a form. I have tried to put the code in linklabel_click event handler in try-catch block, but I still get the error below. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog...

get text of linklabel created at runtime

hello, can someone please explain to me how i can get the Text property of the linklabel that i have created at runtime? I have tried: string str = e.Link.LinkData; ...but that just displays an empty messagebox. Thanks lots :) ...

Is there a way to overwrite the dotted selection/ highlight rectangle for a LinkLabel?

There are certainly some advantages in having a selection rectangle highlighting the currently selected element which also has the focus. However an element with padding can cause the rectangle to be drawn on a totally unwanted position and therefore is hindering and not helpful. So without further ado my question is: Is there a way to h...

Is there a built-in way to replace the text of a link in a LinkLabel and have the other links automatically adjust so they stay on the same text?

In other words, if I have: var ll = new LinkLabel(); ll.Text = "Some links go here."; ll.Links.Add(0, 4); // Some ll.Links.Add(11, 2); // go Is there any method I can call to replace the text of the "Some" link with something else while keeping the "go" link the same. I only want to know if there is a built-in method. This is not h...

Winform/Program and how to write class 1, class 2, class 3, class 4 in array to linklabels?!!?

So my program works like this: using winforms, user enters ID number, using an array, based on the right id number, that student information and class schedule outputs in a message box! My question is how to take the 4 classes in the message box/array and write them to the linklabel text in form 2???? My Getschedule class contains the ...

Link label is cut off at the buttom c#

Hi, In my C# winform application I have a link label. when the text in the link label is localize to chinese the text is cut off at the buttom by the line of the link label. Any idea? ...

Reduce Flicker of .NET FlowLayoutPanel

I'm clearing and adding multiple LinkLabel's to FlowLayoutPanel, every couple of seconds. It works fine, but flicker is quite noticeable. Is there any way to reduce it? I tried to set Form.DoubleBuffering, it didn't help. UPDATE: Managed by creating a custom control derived from FlowLayoutPanel and setting its styles as shown below: P...

Make the background of a Label or LinkLabel transparent

Is it possible to make the background of a LinkLabel transparent? Setting the BackColor to the Transparent system color does not work. Matching the BackColor of the container is not suitable because the container is an image. ...