Page 1 of 1

How can i make a FIFO Window?

Posted: Fri Jan 20, 2006 11:20 am
by RichEnjoyer
Hello everybody,

i try the TRichViewEdit component for future use in my own application.
I want make a chatwindow thats has a max line count of 100 lines.
Whenever comes a new line at the end of the TRichViewEdit than check the actual line count.

while bytlLineCount > MAX do Delete Line 0

How can i do this with the TRichViewEdit?

Thank you, Frank

Posted: Fri Jan 20, 2006 7:54 pm
by Sergey Tkachenko
Adding paragraphs: use Add*** methods, then call FormatTail.
Deleting paragraphs: DeleteParas (without subsequent call of Format or FormatTail)
You should calculate a number of paragraphs (chat messages) yourself.

(FormatTail and DeleteParas were implemented specially for chat/log windows. They do their work as quick as possible)

Posted: Mon Jan 23, 2006 7:33 pm
by RichEnjoyer
Ok Thank you! :D