Changing certain color text

help with changing certain color of a line if text in a richtextbox

Page 1 of 1

3 Replies - 2141 Views - Last Post: 11 August 2009 - 02:40 PM Rate Topic: -----

#1 senister8  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 24-July 09

Changing certain color text

Post icon  Posted 11 August 2009 - 01:22 PM

I'm using a richtextbox with scrolling and I need help with changing a certain line of text to an different color but when I use forecolor and appendtext it changes all the text in the textbox the same color. What can i do to change certain text lines?
Is This A Good Question/Topic? 0
  • +

Replies To: Changing certain color text

#2 kewlkreator  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 38
  • View blog
  • Posts: 1,065
  • Joined: 25-March 09

Re: Changing certain color text

Posted 11 August 2009 - 01:42 PM

Do you have any code? That would help.
Was This Post Helpful? 0
  • +
  • -

#3 LoveIsNull  Icon User is offline

  • Recovering D.I.C Addict
  • member icon

Reputation: 52
  • View blog
  • Posts: 646
  • Joined: 10-March 09

Re: Changing certain color text

Posted 11 August 2009 - 02:20 PM

Sounds like maybe you want to check out the SelectionColor property, or alter the underlying RTF.
Was This Post Helpful? 0
  • +
  • -

#4 senister8  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 24-July 09

Re: Changing certain color text

Posted 11 August 2009 - 02:40 PM

  Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
		int1 += 1


		If int1 = 1 Then
			Scrollbox.AppendText(" Go")
			Call scrolldown()
			Timer1.Stop()
		End If

		If int1 = 2 Then
			Scrollbox.AppendText(" Stop " )
			Call scrolldown()
			Timer1.Stop()
		End If


This is code for a part of the game Im trying to make and I want the text in different colors for each character. (The text is an example not part of the actual text)
:D

Anyway give some examples because i'm new to vb.net
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1