如何在vb 2010中将文本插入richtextbox [英] How do I insert text into a richtextbox in vb 2010
本文介绍了如何在vb 2010中将文本插入richtextbox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在处理笔记应用程序,我无法弄清楚如何从内置的Web浏览器插入文本,这是我目前的代码,但是它出现了错误:
Hi, I'm working on a note taking application and I can't work out how I insert text from an inbuilt web browser, this is the code I currently have however it comes up with errors:
richtextbox1.text.insert(form1.textbox1.text)
如果你可以帮我,那就意味着很多C:
If you could help me it would mean a lot C:
推荐答案
参见 https://msdn.microsoft.com/en-us/library/system.string.insert(v = vs.110)。 aspx [ ^ ]。
您只需执行以下操作即可设置RichTextBox控件的文本:
You can set the text of a RichTextBox control by simply doing:
richtextbox1.Text =form1.textbox1.text
或者,您可以使用AppendText方法:
Or, you can use the AppendText method:
richtextbox1.AppendText(form1.textbox1.text)
如果你在Visual Studio中使用Intellisense,这是你可以自己轻松学习的东西。如果您键入RichTextBox1和一个点。然后你得到一个所有属性和方法的列表,应该能够很容易地看到它。
https://msdn.microsoft.com/en-us/library/system.windows.controls.richtextbox( v = vs.110).aspx [ ^ ]
这篇关于如何在vb 2010中将文本插入richtextbox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文