Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

change first line font type of text in rich textbox

$
0
0

Hai

I am using a  RichTextbox in my c# windows application.I want to give red colour only for first line in the RichTextbox.

For that i try:

                txtRich.SelectionStart = 0;
                txtRich.SelectionLength = 10;
                txtRich.SelectionFont = new System.Drawing.Font("Tahoma", 10, FontStyle.Bold);

The problem is, all the text in the textbox is showing in font size 10.I want this condition to applay for only a single line.

Please help me


Viewing all articles
Browse latest Browse all 12583

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>