Hi Sergey,
I have a regular old rve paragraph of text. I apply a right indent to it, and the text wraps to that indent. Now, how can I convert all the places where it wraps to #13 hard returns? In other words, turn all the wordwrapped lines into separate paragraphs?
Thanks Sergey. I've tried to figure it out but having no luck.
Stan
Wordwrapped Lines to Paragraphs
Re: Wordwrapped Lines to Paragraphs
I think I found the basic answer here:
https://www.trichview.com/forums/viewto ... ard+breaks
It's crude but it works and I aonly want it for small amounts of text.
Sergey, is there any different or newer answer for this, or is the link above what I should do?
Thanks
Stan
https://www.trichview.com/forums/viewto ... ard+breaks
It's crude but it works and I aonly want it for small amounts of text.
Sergey, is there any different or newer answer for this, or is the link above what I should do?
Thanks
Stan
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Wordwrapped Lines to Paragraphs
This is still the simplest way to make it in an undoable way. But sending WM_KEYDOWN now can be replaced by SplitAtCaret function.
Also, there now there is a method that can split text item in non-undoable way efficiently (RVSplitTextItem from RVLinear.pas).
If you need, I can create a sample code that uses it.
Also, there now there is a method that can split text item in non-undoable way efficiently (RVSplitTextItem from RVLinear.pas).
If you need, I can create a sample code that uses it.
Re: Wordwrapped Lines to Paragraphs
Hi Sergey,
I could not get SplitAtCaret to do anything. If you have some simple example that would be great.
As far as RVSplitTextItem, I'm using v19.5 and my RVLinear does not seem to have anything like that in it.
Any ideas appreciated!
Stan
I could not get SplitAtCaret to do anything. If you have some simple example that would be great.
As far as RVSplitTextItem, I'm using v19.5 and my RVLinear does not seem to have anything like that in it.
Any ideas appreciated!
Stan
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Wordwrapped Lines to Paragraphs
Sorry, I was wrong about SplitAtCaret.
It can break a text item at the caret position, but it does not make a paragraph break.
So the original code should not be changed.
I misprinted, this function is in RVInsertItems.pas. However, like SplitAtCaret, it breaks a text item, but does not make a paragraph break, so additional code is required to make it.
It can break a text item at the caret position, but it does not make a paragraph break.
So the original code should not be changed.
I misprinted, this function is in RVInsertItems.pas. However, like SplitAtCaret, it breaks a text item, but does not make a paragraph break, so additional code is required to make it.
Re: Wordwrapped Lines to Paragraphs
OK, good to know. I modified the older code a little so it only changes the selection and it should work for what little I'll do with it.
Thanks Sergey
Stan
Thanks Sergey
Stan