"Adrian" <Ad****@nospamhotmail.com.uk> schrieb:
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
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>