Skip to content
Permalink
Browse files

[ChangeRTBFont] Use Unicode-safe selection changing when changing font.

  • Loading branch information...
nmbook committed Oct 31, 2017
1 parent 3972472 commit 280228936df6d463e8db44fa4158a898a98eb70c
Showing with 2 additions and 3 deletions.
  1. +2 −3 trunk/frmChat.frm
@@ -7468,16 +7468,15 @@ Private Sub ChangeRTBFont(rtb As RichTextBox, ByVal NewFont As String, ByVal New
Dim tmpBuffer As String

With rtb
.SelStart = 0
.SelLength = Len(.Text)
SetTextSelection rtb, 0, -1
.SelFontSize = NewSize
.SelFontName = NewFont
tmpBuffer = .TextRTF
.Text = vbNullString
.Font.Name = NewFont
.Font.Size = NewSize
.TextRTF = tmpBuffer
.SelStart = Len(.Text)
SetTextSelection rtb, -1, -1
End With
End Sub

0 comments on commit 2802289

Please sign in to comment.
You can’t perform that action at this time.