WPCubed Product Support

Full/Block justification not working

I have a toolbar w/ 4 buttons on it - left/center/right/block justification.

The following code works for the first three buttons, but the final button for "full" justification does nothing. My question is why?

Alternatively, is there any other built-in way to take a line of text and format it with 'equal spacing between words' so that it fills the page margins?

case _Tag of
0:
WPRichTExt1.CurrAttr.Alignment := paralLeft;
1:
WPRichTExt1.CurrAttr.Alignment := paralCenter;
2:
WPRichTExt1.CurrAttr.Alignment := paralRight;
3:
WPRichText1.CurrAttr.Alignment := paralBlock;
end;

Thanks,

alan

#1 ♥ 0
2.6k Views 2 users read 1 min
support

Hi,

unless You use the FormatOptions flags

wpJustifySoftLinebreaks, // Justify \n
wpJustifyHardLinebreaks, // Justify \r

the last line of a paragraph will not be justified.

Regards,
Julian Ziersch

#2 ♥ 0
This category is archived. No new posts are possible.