在文本的特定部分应用删除线的最简单方法是什么?
例如:
rxtTest.text = "Stackoverflow is a very good site" 'Apply strikeout just on 'very'
答案 0 :(得分:1)
'rxtTest = My WinForm RichTextBox
'rxtTest.Text = "Stackoverflow is a very good site"
'text selected = "very"
Private Sub rxtTest_MouseCaptureChanged(sender As System.Object, e As System.EventArgs) Handles rxtTest.MouseCaptureChanged
Dim f As New System.Drawing.Font("Arial", 12, FontStyle.Strikeout)
rxtTest.SelectionFont = f
End Sub
'After this code my text selected ("very") will be strikeout