突出显示richtextbox C#中的特定文本 [英] Highlight specific text in richtextbox C#

查看:106
本文介绍了突出显示richtextbox C#中的特定文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含listbox,textboxex和一些richtextbox的表单。当我们在列表框中选择任何字母名称时,它会将数据绑定到所有textboxex和richtextbox上。
当我们从列表框中选择任何字母名称时,
i想要在richtextbox中突出显示一些文本。

例如。



只是一个友好的提醒,你有<<< OverdueInvCount>>逾期发票,逾期余额为<<< OverdueInvTotal>>。如果您对欠款有任何疑问,请致电我们,我们将很乐意与您讨论。如果您已经发送了付款,请忽略此提醒。



来自数据库的所有数据。



i想突出显示<<< OverdueInvCount>>和<<< OverdueInvTotal>>这些话。当我从列表框中选择一个字母。

I have a form that contains listbox, textboxex and some richtextboxes. When we select any letter name in listbox, it bind the data to all the textboxex and richtextboxes.
i want to highlight some text in richtextbox when we select any letter name from listbox.
eg.

Just a friendly reminder that you have <<OverdueInvCount>> overdue invoice(s), with an overdue balance of <<OverdueInvTotal>>. If you have any questions about the amount you owe, please give us a call and we’ll be happy to discuss it. If you’ve already sent your payment, please disregard this reminder.

all the data coming from database.

i want to highlight <<OverdueInvCount>> and <<OverdueInvTotal>> these words.when i select a letter from listbox.

推荐答案

你必须自己构建完整的解决方案。

但是,这里有一些链接可能会给你一些尝试 -

http:// www.dotnetcurry.com/ShowArticle.aspx?ID=146 [ ^ ]

背景使用RichTextBox突出显示系统方式。 [ ^ ]

在RichTextBox中启用语法高亮显示 [ ^ ]
You will have to build the complete solution on your own.
However, here are some links that might give you some ideas to try out -
http://www.dotnetcurry.com/ShowArticle.aspx?ID=146[^]
Background Highlighting with the RichTextBox the System way.[^]
Enabling syntax highlighting in a RichTextBox[^]


这篇关于突出显示richtextbox C#中的特定文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆