Clickable Text!

  • Thread starter Thread starter Adrian
  • Start date Start date
A

Adrian

Hi All
I have some text that I want to parse and display in such a way that a
user can click on different bits and depending what the click on call the
relevant sub.

is the Rich Text Box the correct control for this? if so how would I do it?
if not what should I be using?


example:
textline1 = "the cat sat"
textline2 = "the dog Jumped"

The user could say click on Cat, Dog or jumped and a different sub would be
called for each, I would also need to colour the clickable words!

Any idea how I would do this?

Thanks
 
Adrian said:
I have some text that I want to parse and display in such a way that a
user can click on different bits and depending what the click on call the
relevant sub.

is the Rich Text Box the correct control for this? if so how would I do
it? if not what should I be using?


example:
textline1 = "the cat sat"
textline2 = "the dog Jumped"

The user could say click on Cat, Dog or jumped and a different sub would
be
called for each, I would also need to colour the clickable words!

Maybe the linklabel control is more suitable if you don't need rich
formatting in the text. Sample:

\\\
Imports System.Diagnostics
..
..
..
With Me.LinkLabel1.
Text = "Besuchen Sie mich in Berlin oder Hamburg!"
.Links.Add(21, 6, "http://www.berlin.de")
.Links.Add(33, 7, "http://www.hamburg.de")
End With
..
..
..
Private Sub LinkLabel1_LinkClicked( _
ByVal sender As Object, _
ByVal e As LinkLabelLinkClickedEventArgs _
) Handles LinkLabel1.LinkClicked
Process.Start(e.Link.LinkData)
End Sub
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top