我需要大胆一些文字,我将它们添加到RichTextBox控件,目前这里是我的代码选择和格式化文本
编辑
With txtDetails
If Not IsNullOrEmpty(title) Then
Dim intStart As Integer
intStart = Len(.Text)
.Text = .Text & title '& vbCrLf
.SelStart = intStart
.SelLength = Len(title)
.SelBold = True
.SelLength = 0
.SelBold = False
.Text = .Text & vbNewLine
End If
If Not IsNullOrEmpty(value) Then
.Text = .Text & value & vbNewLine
End If
.Text = .Text & vbNewLine
End With
谁能帮我我已经修改了代码,但仍是修复
得到所有的后续测试我添加要大胆,insted的兴趣
文本追加到RTB控制使文本失去其格式 – Smith
我想我不知道什么是“格式”你指的是。上面的代码就像你所问的一样,尽我所能。我没有看到任何“格式丢失”。 – Bob77