RichTextBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several lines of text in an rtb control that is populated by a sqldatareader when a user selects an item in a combobox. How do I make a line that has specific text I'm searching for display at the top of the rtb? In other words, I want to scroll the text until that specific word/phrase is at the top left of the control. So far the text shows up at the bottom of the rtb.

Thank you,
Richard
 
* "=?Utf-8?B?UmljaGFyZA==?= said:
I have several lines of text in an rtb control that is populated by a
sqldatareader when a user selects an item in a combobox. How do I make a
line that has specific text I'm searching for display at the top of the
rtb? In other words, I want to scroll the text until that specific
word/phrase is at the top left of the control. So far the text shows up
at the bottom of the rtb.

Untested:

\\\
With Me.RichTextBox1
.Select(PosFound, 0)
.Focus()
.ScrollToCaret()
End With
///
 
Back
Top