【问题标题】:Red Underline selected text in richtextbox红色下划线在richtextbox中的选定文本
【发布时间】:2014-03-22 20:07:48
【问题描述】:
while ((indice = TextBox_stampa_contenuto.Text.IndexOf(parola, inizioParola)) != -1)
{
     TextBox_stampa_contenuto.Select(indice, parola.Length);
     TextBox_stampa_contenuto.SelectionFont = new Font(TextBox_stampa_contenuto.SelectionFont, FontStyle.Underline); 
     inizioParola = indice + parola.Length;
}

这部分代码查找指定的单词并在其下划线。如何将它设置为像 MS Word 中的拼写错误一样下划线? 谢谢。

【问题讨论】:

  • .net 版本是什么?如果您使用的是 .net 3.0+ 和 WPF,那么您可以使用拼写检查类对象。

标签: c# winforms richtextbox selectedtext


【解决方案1】:

【讨论】:

    猜你喜欢
    • 2010-09-16
    • 2013-08-22
    • 2014-09-26
    • 1970-01-01
    • 1970-01-01
    • 2020-07-29
    • 2014-10-14
    • 2011-09-19
    • 2017-06-10
    相关资源
    最近更新 更多