| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > Delphi: Общие вопросы > help to split text in richedit how ? |
| Автор: huismori 1.12.2010, 20:50 |
| i want to split text in richedit after every 500 characters, is it possible ? |
| Автор: muratboy31 3.12.2010, 15:22 |
| i saw something like that on the net and i tried to find it again but i could find it... sorry !!! |
| Автор: huismori 3.12.2010, 15:25 |
| it would be good if you could have found it again... i also searched on the net but no luck... what i want to do is; split the text in richedit after every 500 or 1000 characters and save to the txt files... i dont know if it is possible also !!! |
| Автор: huismori 3.12.2010, 16:22 | ||
| i found something but it doesnt really do what i want !!! how can i work with this code !!!
|
| Автор: huismori 3.12.2010, 17:29 | ||
ok i found something else... it is doing what i want but there is a small problem with it, it is splitting the character in word... how can i make it not to split if it is in the word and jump to next space to split !!!
|
| Автор: huismori 8.12.2010, 10:26 |
| can anyone help me please ? |
| Автор: cat512 8.12.2010, 13:04 | ||||
you can try this
|
| Автор: huismori 8.12.2010, 15:37 | ||||||
what do you mean with ''the code of tab'' !!! |
| Автор: cat512 8.12.2010, 19:39 | ||
iif you need to split some text beginning at special character like gaps (#32), crlf(#13#10), tab character(i forget the number) and etc, then you must add the number of special character into that parameter |
| Автор: huismori 8.12.2010, 22:24 |
| what i want to do is to split the text in rich edit after every 500 characters and put every 500 character in different memo objects... |
| Автор: cat512 9.12.2010, 01:10 | ||||
It isn't difficult.
don't forget declare the "math" unit |
| Автор: huismori 9.12.2010, 09:57 |
| thanks alot cat512 thats doing what i want... 1 more thing; can i put splitted texts in memo objects or stringlists? not in message dialogs !!! |
| Автор: cat512 9.12.2010, 13:50 |
| yes you can. It is a sample I have showed you. Of course, you can improve it |
| Автор: huismori 9.12.2010, 14:29 | ||
| here what i tried but it didnt really do it good !!! it giveas error if there is no data in to put in memo4... error is: List index out of bounds(4) what am i doing wrong ???
|
| Автор: cat512 9.12.2010, 17:45 | ||
| Who writes a cycle so??? you need to index the "table's" items by variable of cycle.
In generally, it will be better never to use the stringlist object here. Why do you need a unnecessary variable? |
| Автор: huismori 9.12.2010, 17:57 |
| i need to make limited lists for text and it is gonna be about 500 or 1000 characters and after i need to send these lists to user... so i thought it would b easier if i put them in memo objects... do u have better idea ? |
| Автор: cat512 9.12.2010, 19:28 |
| I understood what you need, but I need to specify some points. How are you going to send a text for your users? I would like that you give me more details. |
| Автор: huismori 9.12.2010, 20:09 |
| thanks alot for all your helps cat512 i managed to it for the moment... |
| Автор: huismori 14.12.2010, 14:36 |
| solved !!! |