5

I have a label being populated with dynamic text. It is often a paragraph or so in length. I need to seamlessly integrate a LinkLabel at the end of this paragraph with the words "View more ..." .

It should look like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur laoreet bibendum tortor. Donec lacinia orci euismod lorem mollis consectetur. Pellentesque velit lacus, auctor in dignissim ac, malesuada at justo. Praesent bibendum tempus facilisis. View more ...

I've included a Label and a LinkLabel within a panel but cannot align these two controls so that they flow together seamlessly.

How do I accomplish this within WinForms?

Thank you.

AlexScript
  • 809
  • 8
  • 18

1 Answers1

6

Add all text to the LinkLabel, and use the LinkArea property to set what area in the text is actual a link.

Patrick
  • 17,669
  • 6
  • 70
  • 85
  • That's aweosome!! Thanks for pointing that out! Now if I needed to ask "How do I make my LinkLabel wrap?" (It is very long and is all on one line inside my panel, how do I make it wrap to multiple lines within my panel), should I create a new question or do you kno wthe answer to this too? Thanks again mate, I really apreciate it! – AlexScript Nov 16 '11 at 18:36
  • @AlexScript Doesn't the label wrap the text automatically? If you adjust the `Width` property that is? – Patrick Nov 16 '11 at 18:48
  • Thanks for the help. I had the width set, and autosize set to true, and what finally did it was setting the "Dock" property to "fill". Thanks again for all the help. I inherited a WinForms project when all I have as .net experience is ASP and C#. lol Thanks again. – AlexScript Nov 16 '11 at 18:58