如何在RichTextBox的文本上绘制文本 [英] How to draw text on text of RichTextBox

查看:77
本文介绍了如何在RichTextBox的文本上绘制文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在RichTextBox的文本上绘制文本。例如:我想在RichTextBox的单词

hello上画一个单词hello,其文本为hello world!。我该怎么办?

I want to draw text on the text of RichTextBox. For ex: i want to draw a word "hello" on the word
"hello" of RichTextBox whose text is "hello world!". How do i do it?

推荐答案

使用 Graphics.DrawString [ ^ ]方法。这假设您知道如何将字符串hello放在hello world中的hello上。这不是一件容易的事。
Use one of the Graphics.DrawString[^] methods. This assumes you know how to position the string "hello" over the "hello" in "hello world". This is not trivial.


这篇关于如何在RichTextBox的文本上绘制文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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