Add a linklabel control to the controls collection of the listbox:
Dim olink As New LinkLabel
olink.Text = "Google"
olink.Links.Add(0, Len(olink.Text), "www.google.com")
ListBox1.Controls.Add(olink)
Add a handler for the LinkClicked event of the LinkLabel and add code to
navigate to the URL that's specified by the LinkLabel:
AddHandler olink.LinkClicked, AddressOf LinkClicked
Private Sub LinkClicked(ByVal sender As Object, _
ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs)
System.Diagnostics.Process.Start(CStr(e.Link.LinkData))
End Sub
hope that helps..
Imran.
> Hello,
>
> I have a ListBox filled with many lines of simply text I want to make
> few lines be a LinkLabel
>
> How can I do this
>
> Thanks
>
|