gpt4 book ai didi

vb.net - 更改富文本框中的线条或单词的颜色?

转载 作者:行者123 更新时间:2023-12-01 07:28:04 26 4
gpt4 key购买 nike

我可以更改一行和/或一个单词的颜色以保留 Richtextbox 中的其他颜色吗?

例如,我想将“Processing: ...”行更改为黄色,这可能吗?

谢谢阅读

enter image description here

最佳答案

这可能有点晚了,但您需要做的就是将 selectioncolor 设置为您想要的颜色,然后再将文本附加到 Richtextbox,然后恢复到原始颜色,例如

With RichTextBox1
.SelectionColor = Color.Yellow
.AppendText("Processing: ")
.SelectionColor = Color.LimeGreen
.AppendText("el senor de los anillakos.avi" & vbCr)
End With

关于vb.net - 更改富文本框中的线条或单词的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13583494/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com