如何突出显示RichTextBox中的整行? [英] How to Highlight the Entire Row in RichTextBox?
问题描述
我正在制作歌曲编辑。我已经有办法找到需要选择的行,我将它存储在字典中
我想突出显示这样的行
但我只能弄清楚如何让它突出显示实际文本
but i can only figure out how to get it to highlight the actual text
我的程序在RichTextBox中有文本。如何让它突出显示文字?
My program has the text in a RichTextBox. how to i get it to highlight the text?
此外,在良好的图像中,没有空格填充结尾,它只是突出显示整行
Also, in the good image, there is not white space to pad out the end, it just highlights the entire row
推荐答案
您好Flashkid10,
Hi Flashkid10,
根据你的描述,你想在richtextbox中选择已退出的行,如果有一些文本框,你可以这样做,但如果没有,你就不能这样做,因为它和记事本一样。
According to your description, you want to select entired line in richtextbox, if there are some textbox, you can do this, but if there is nothing, you could not do this, because it is same like Notepad.
如果您仍想这样做,有两种方法可以做到这一点,一种是使用其他控件,如ListBox,另一种是添加InlineUIContainer来尝试。
If you still want to do this, there are two way to do this, one is using other control, like ListBox, another is to add InlineUIContainer to try .
最好的问候,
Cherry
这篇关于如何突出显示RichTextBox中的整行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!