Bold in RichtextBox

前端 未结 2 1246
庸人自扰
庸人自扰 2021-01-06 18:26

I\'ve been working on my richtextbox but I ran into something weird... I want to make the first word on everyline bold

using this code:

        RichT         


        
2条回答
  •  盖世英雄少女心
    2021-01-06 19:31

    The line...

    int srt = bold.Find(name);
    

    ...is finding the first occurrence of the word that starts the line. If you look at the words that haven't been set bold then you will see that they all occur earlier in the rich text box.

提交回复
热议问题