By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,672 Members | 1,383 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,672 IT Pros & Developers. It's quick & easy.

Richtextbox Control + Highlighting

P: n/a
I have a richtextbox control and I am adding several lines of text to it.

I am trying to make it so that any text that starts with "*" is bolded, and
that all other lines are kept in regular type.

However, when I try switching between bold and regular the whole RTB control
either becomes bold or regular type..how can I fix this?

thanks for your help!
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* "jman3" <no****@nospam.com> scripsit:
I have a richtextbox control and I am adding several lines of text to it.

I am trying to make it so that any text that starts with "*" is bolded, and
that all other lines are kept in regular type.

However, when I try switching between bold and regular the whole RTB control
either becomes bold or regular type..how can I fix this?


Have a look at the control's 'SelectionFont' property.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
I took a look...but how do I tell it to select the correct line# ?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "jman3" <no****@nospam.com> scripsit:
I have a richtextbox control and I am adding several lines of text to it.
I am trying to make it so that any text that starts with "*" is bolded, and that all other lines are kept in regular type.

However, when I try switching between bold and regular the whole RTB control either becomes bold or regular type..how can I fix this?


Have a look at the control's 'SelectionFont' property.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #3

P: n/a
* "jman3" <no****@nospam.com> scripsit:
I took a look...but how do I tell it to select the correct line# ?


You can use the RichTextBox's 'Select' method.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.