テキストボックスの中に色をつける


神酒  2003-10-26 18:52:54  No: 109431

テキストボックスに表示される文字の一部に色を付けることは可能ですか?

1234567890とあるうち456だけ赤くするとかそんな感じです


いちゆ  2003-10-26 23:00:29  No: 109432

リッチテキストボックスなら可能です。


Mr.アンダーソン  2003-10-28 21:00:17  No: 109433

MsgTextBox.SelStart = 0
MsgTextBox.SelLength = 0
MsgTextBox.SelColor = RGB(0, 0, 0)
MsgTextBox.SelText = "789"

MsgTextBox.SelStart = 0
MsgTextBox.SelLength = 0
MsgTextBox.SelColor = RGB(255, 0, 0)
MsgTextBox.SelText = "456"

MsgTextBox.SelStart = 0
MsgTextBox.SelLength = 0
MsgTextBox.SelColor = RGB(0, 0, 0)
MsgTextBox.SelText = "789"

こんな感じでできるハズ。
リッチテキストの出し方とかは、ログを検索してみてください。


※返信する前に利用規約をご確認ください。

※Google reCAPTCHA認証からCloudflare Turnstile認証へ変更しました。






  このエントリーをはてなブックマークに追加