I need to build the functionality to insert new blank lines in between each selected line in a document. I do not see a way to do this. I tried using cpline and looping through the selected text document but no luck.
Any suggestions?
I need to build the functionality to insert new blank lines in between each selected line in a document. I do not see a way to do this. I tried using cpline and looping through the selected text document but no luck.
Any suggestions?
Hi,
Do you need a blank paragraph after each paragraph, just some distance between the lines (LineHeight would do it), a new paragraph after each line.
It really makes a lot of difference what the input text is expected to be.
Julian
I do not need a paragraph between each line. I do however need more than just line space. I need a blank line that can be selected and text typed into between each line selected in a document. I'm creating a chord and music editor.
For example I have a verse in a song like so:
I believe in Jesus
I believe He is the Son of God
I believe He died and rose again
I believe He paid for us all
I want the user to be able to select this verse and then click a button and the verse will look like this:
I believe in Jesus
I believe He is the Son of God
I believe He died and rose again
I believe He paid for us all
Now the user can click on the new lines between the lyrics and insert chords and notes.
Hi,
so this seems to be empty paragraphs after paragraphs.
This is quite easy to do.
var par, bpar : TParagraph;
dummy : Integer;
begin
par := WPRichText1.TextCursor.GetBlockEnd(dummy);
bpar := WPRichText1.TextCursor.GetBlockStart(dummy);
while par<>nil do
begin
par.AppendNewPar(false);
if par=bpar then break;
par:= par.PrevPar;
end;
WPRichText1.ReformatAll(false, true);
Alles anzeigen