• Welcome to Valhalla Legends Archive.
 

Multiple text colors in a single text box?

Started by Tontow, May 17, 2005, 06:50 PM

Previous topic - Next topic

Tontow

Is it possable to add different collored text to a text box? - IE: Have one word be red, the next green, the next blue, etc.

Warrior

You will have to use a RichTextBox for this.

Edit: More info.

Once you use this control look into the

setColor property.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Newby

Yes. There was a bug with {\rtfx..} tags that allowed users to specify how big their font was and such.

As long as you're using a rich text box, though.
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

Warrior

afaik, theres a message you can send it to render that useless. I forget message
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Tontow

Quote from: Newby on May 17, 2005, 06:51 PM
Yes. There was a bug with {\rtfx..} tags that allowed users to specify how big their font was and such.

As long as you're using a rich text box, though.

Umm, what setColor property, I couldn't find a reference to it on msdn.

And what are {\rtfx..} tags?

Warrior

Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Topaz

Replacing the slash with the reverse should fix that exploit.

Warrior

Quote from: Warrior on May 17, 2005, 06:52 PM
afaik, theres a message you can send it to render that useless. I forget message
[/b]

I'll find it later.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Tontow

I found SelColor, but there is no setcolor that I can see.

Warrior

Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

UserLoser.

Quote from: Newby on May 17, 2005, 06:51 PM
Yes. There was a bug with {\rtfx..} tags that allowed users to specify how big their font was and such.

As long as you're using a rich text box, though.

It's not actually a bug

Ban

Indeed it is not, its auctually RTF formatting. I'll find a link that has stuff about it later.

UserLoser.

To simply eliminate this vulnerability to your rich text box, use EM_STREAMIN instead of EM_REPLACESEL (.SelText)

R.a.B.B.i.T


Tontow

#14
       
        txtmainchat.Text = tempstring(index) & vbCrLf & txtmainchat.Text
        txtmainchat.SelStart = 0
        txtmainchat.SelLength = Len(tempstring(index))
        txtmainchat.SelColor = RGB(163, 163, 163)


tempstring(index) is the text to be added, txtmainchat is the chat window display

It changes all the text that color, when I just want one line that color....

How do I keep this from happing?