justify - paragraph

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

Re: justify - paragraph

Post by tiagosis » Fri Jun 29, 2018 10:46 pm

Where should I set this property to achieve this result? I use srichview

tiagosis
Posts: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis » Sat Jun 30, 2018 12:39 pm

Hello, I changed RichViewJustifyBeforeLineBreak: = True; but it did not work as expected, how to proceed?

Sergey Tkachenko
Site Admin
Posts: 14216
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko » Sat Jun 30, 2018 1:37 pm

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: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis » Sat Jun 30, 2018 1:42 pm

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: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis » Sat Jun 30, 2018 2:00 pm

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: 14216
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko » Sat Jun 30, 2018 2:37 pm

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: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis » Sat Jun 30, 2018 2:56 pm

follow file rvf
Attachments
EXAMPLE.rvf
(9.4 KiB) Downloaded 30 times

Sergey Tkachenko
Site Admin
Posts: 14216
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko » Sat Jun 30, 2018 5:22 pm

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: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis » Sat Jun 30, 2018 6:05 pm

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: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis » Sat Jun 30, 2018 6:07 pm

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: 14216
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko » Sat Jun 30, 2018 6:25 pm

This is what I see when I load this document in ScaleRichView:
justify.png
justify.png (44.49 KiB) Viewed 2440 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: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis » Sat Jun 30, 2018 6:32 pm

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: 14216
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: justify - paragraph

Post by Sergey Tkachenko » Sat Jun 30, 2018 6:48 pm

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: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis » Sat Jun 30, 2018 6:52 pm

okay, but I do not need a line break but justification stays, there's nothing that can be done about it?

tiagosis
Posts: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: justify - paragraph

Post by tiagosis » Sat Jun 30, 2018 7:11 pm

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