richtextbox的新添加指定文字变色和项目符号实现问题,说的够详细的吧,希望帮帮忙,给50分

steven_liuj 2005-09-03 03:11:38
Private Sub Command2_Click()

RTextBox1.SelStart = Len(RTextBox1.Text)
RTextBox1.SelLength = 0
RTextBox1.SelBullet = True
RTextBox1.SelColor = vbRed
RTextBox1.Text = RTextBox1.Text & vbCrLf "new word"

RTextBox1.SelBullet = False
End Sub

Private Sub RTextBox1_Change()
If LenB(RTextBox1.Text) > 50000 Then
RTextBox1.SelStart = Len(RTextBox1.Text) - 2000
RTextBox1.SelLength = 2000
Dim sel As String
sel = RTextBox1.SelText
RTextBox1.Text = sel
End If
RTextBox1.SelStart = Len(RTextBox1.Text)
RTextBox1.SelLength = 0
End Sub

以上的代码无法实现“new word”变红色,和有项目符号,请问应该怎么写程序?
...全文
221 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
northwolves 2005-09-04
  • 打赏
  • 举报
回复
Private Sub Command2_Click()


RTextBox1.SelStart = Len(RTextBox1.Text)
RTextBox1.SelLength = 0
RTextBox1.SelBullet = True
RTextBox1.SelColor = vbRed
RTextBox1.SelText = "new word" & vbCrLf
RTextBox1.SelBullet = False
End Sub

Private Sub Form_Load()
RTextBox1.Text = ""
End Sub
daisy8675 2005-09-04
  • 打赏
  • 举报
回复
你的代码看得很辛苦,完全把我给看混乱了

这么简单的说:你想干嘛?

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧