WPCubed Product Support

Format Label

Hello,
I have a rich text label and let the user put text into it using a button that copies text from the WPRichText. Is there a way for me to format the text inside the rich text label. After it is in there I would like to then format it to be centered. Instead of left justified as they may send it in

Thank you Julian.

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

Hi,

You can create a loop over all paragraphs

var par : TParagraph;
begin
  par := WPRichTextLabel1.FirstPar;
  while par<>nil do
  begin
     par.ASet(WPAT_Alignment, Integer(paralCenter)); 
     par := par.next;
  end;
  WPRichTextLabel1.ReformatAll(false, true);
#2 ♥ 0
This category is archived. No new posts are possible.