Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2001, 10:58 AM
gLes gLes is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,273
Default Making a chat program with TRichEdit...

Hi...
Since I don't trust anything that has stringlist in it I must ask this question:

Is it possible to send one line from the richedit full of styles and add it to the other side's richedit keeping all the styles just by sending the specific string?

Thx...gLes...
Reply With Quote
  #2  
Old 01-20-2001, 03:39 PM
Wise Guy Wise Guy is offline
Member
 
Join Date: Jan 2001
Posts: 45
Default RE: Making a chat program with TRichEdit...

Hey!
As you know (hope so) when you copy a formatted string from the clipboard and paste it in another RichEdit the string will be formatted just like the source. I've never tried to send a RichEdit formatted string through sockets for example but you can actually do something like a trick to make it if it cannot be made automatically. Here's what I can suggest you:
1) You can scan every single line (or character ) from the RichEdit component (its lines are TStrings)
2) for every line you want to send the format you can create yourself something like an alias which will be understandable from both sides of the chat
3) send the string and let the other side decode it.

Here are some example codes (not all of them) that a RichEdit can "understand":
ansi
b
bin
blue
bullet
cb
cell
cf
colortbl
cpg
deff
deflang
deftab
dibitmap
dn
dy
emdash
endash
Reply With Quote
  #3  
Old 01-21-2001, 11:42 PM
pascal.enz pascal.enz is offline
Member
 
Join Date: Jan 2001
Posts: 73
Default RE: RE: Making a chat program with TRichEdit...

The TStrings of the RichEdit don't show the formating paragraphs. But when you save the RichEdit text to a stream (instead of a file) you will receve all the tokens. So I think the easiest way is just to write the RichEdit text to a TWinSocketStream. (TRichEdit.SaveToStream / TRichEdit.LoadFromStream)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 04:16 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.