|
-
Jan 14th, 2000, 09:40 AM
#1
Thread Starter
Junior Member
I have searched and read previous posts regarding similar topics, but none seemed to help. What I want to do is have something sort of like how america online has their richtext box, where the names of the people typing are a certian color but the text they type is just black. What I have set up is a text box(txtEdit), and in the keydown event, i have it so when enter or chr(13) is detected, it sends text to the RTB. I want it to do someting like this:
txtView.text = textView.text & (start of the color) UserName & ":" (end of color) & txtEdit.text
(UserName is the persons handle, say "Mike". where txtEdit is the textbox they type into, and txtView is the RTB is shows up in)
does anyone have any idea how I would do this? any help at all would be greatly appreciated.
-
Jan 14th, 2000, 07:32 PM
#2
Hyperactive Member
I don't know if this will be much use, but I saw an article on colour coding and such stuff at:
http://www.vb-world.net/tips/tip148.html
P.S: Does anyone know I can put a piece of text in a message on this board so it is a hyperlink (like the text above)?
-
Jan 14th, 2000, 07:34 PM
#3
Hyperactive Member
No need to tell me! I've just discovered it does it automatically.
-
Jan 15th, 2000, 12:09 PM
#4
Thread Starter
Junior Member
thanks, but the:
previouscolor=rtfbox1.selcolor
rtbox1.textrtf = left ( rtbox1.textrtf,len(rtbox1.textrtf)- len("MIKE"))
rtbox1.selcolor = VBBlue
rtbox1.textrtf = rtbox1.textrtf & "MIKE"
rtbox1.selcolor= previouscolor
that doesnt seem to work, isnt there a way to make html enabled with rtb? that would be alot easier
-
Jan 15th, 2000, 12:13 PM
#5
Addicted Member
I believe you can put in the RTB_Change event code that checks if the user name was writen and change the color :
RTBox1.SelColor = VBBlue
How?
By doing suposing the name is "MIKE" (4 char):
previouscolor=rtfbox1.selcolor
rtbox1.textrtf = left ( rtbox1.textrtf,len(rtbox1.textrtf)- len("MIKE"))
rtbox1.selcolor = VBBlue
rtbox1.textrtf = rtbox1.textrtf & "MIKE"
rtbox1.selcolor= previouscolor
I just wrote this piece so if it doesn't work stays the ideia.
------------------
Jorge Ledo
[email protected]
Portugal
[This message has been edited by JorgeLedo (edited 01-15-2000).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|