Visual Basic.net highlight a single line of text in a multy line textbox.

Visual Basic.net highlight a single line of text in a multy line textbox.

isocam
Collaborator Collaborator
263 Views
0 Replies
Message 1 of 1

Visual Basic.net highlight a single line of text in a multy line textbox.

isocam
Collaborator
Collaborator
Can anybody tell me how to highlight a single line of text in a multy line textbox in a mouse down event

I have a textbox containing hundreds of lines of text.

I need the user to click a single line of text, using the mouse and that line only to be highlited.

This is what I have tried but it is not working correctly.

TextBox1.SelectionLength = Me.TextBox1.GetLineFromCharIndex(Me.TextBox1.SelectionStart)

Can anybody help?

Regards

IsoCAM
0 Likes
264 Views
0 Replies
Replies (0)