justify - paragraph

General TRichView support forum. Please post your questions here
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

Where should I set this property to achieve this result? I use srichview
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

Hello, I changed RichViewJustifyBeforeLineBreak: = True; but it did not work as expected, how to proceed?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko »

I just tested in the newest version of the components, and RichViewJustifyBeforeLineBreak works as designed.
It does not affect last lines in paragraphs, it affects last lines before line breaks added using Shift+Enter (i.e. line breaks inside paragraph).

If RichViewJustifyBeforeLineBreak = False (default), these lines are processed like last paragraph lines.
If RichViewJustifyBeforeLineBreak = True, these lines are processed like normal (not last) paragraph lines.

PS: this is an old topic, and some information in it is obsolete. The new version of TRichView supports justifying of bi-directional paragraphs.
Additionally, there is a new property controlling the alignment of last lines in justified (and distributed) paragraphs: LastLineAlignment (if RichViewJustifyBeforeLineBreak = False, this paragraph property also affects lines before Shift+Enter breaks). You can align these lines to the left, right, auto (depending on BiDiMode) or process them as normal lines (i.e. to justify them to the both sides).
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

I'm using the latest and most updated version of TRichView, where I find and how do I set up this new "LastLineAlignment" property?
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

I'm attaching an image for better understanding, notice that in the red square I push the word with spaces but the red line does not automatically adjust to the end as it should

http://prntscr.com/k15tsa
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko »

This image does not show which type of line break is there.
Please save this document as RVF file and attach to this topic.
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

follow file rvf
Attachments
EXAMPLE.rvf
(9.4 KiB) Downloaded 1699 times
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko »

Are you sure that this is a correct example?
This text does not have a fragment from your screenshot.
And it does not have line breaks added by Shift+Enter.
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

I took an example to show you, but none of my rtf texts corrects the line spacing when the text is justified and then successive line spacing is made.
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

I took an example to show you, but none of my rtf texts corrects the line spacing when the text is justified and then added spaces in the line. what I need is that added spaces to the line if self tuning is justified just like in word.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko »

This is what I see when I load this document in ScaleRichView:
justify.png
justify.png (44.49 KiB) Viewed 45084 times

The large paragraph started from "SAIBAM" is justified, text is aligned to the both sides of lines (except for the last paragraph line).

I do not understand what you want to change.
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

in the "Capital do Estado de Mato..." section if you push this excerpt with spaces so that it falls on the line below. Notice that the line above to which this part belonged was not justified.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko »

Ok, now I understand. Sorry, justifying multiple spaces are still not implemented. Only one space character must be between words.

I can still repeat my original suggestion: do not use multiple spaces to move text to the new line. Instead, press Shift+Enter to add a line break (and assign RichViewJustifyBeforeLineBreak = True)
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

okay, but I do not need a line break but justification stays, there's nothing that can be done about it?
tiagosis
Posts: 41
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis »

I tried the shift + enter with the property set to true in the constant "RichViewJustifyBeforeLineBreak" by the time I'm going to use it anyway, but if this aspect of the spaces were seen in future updates it would be interesting, thanks for the time being
Post Reply