Page 1 of 1

Change style to part of text

Posted: Tue Apr 17, 2007 7:10 am
by apicito
I insert into table cell a texto:

Code: Select all

  table.Cells[0,0].AddNL( 'aaaaaaaaaaaaaaaaaaaaa '+cargo+' bbbbbbbbbbbbbbbb',7,3);
I need insert "cargo" variable in other style (Bold). How I do it?

Posted: Tue Apr 17, 2007 8:38 am
by Sergey Tkachenko
Do you want to do it as an editing operation (that can be undone by user?)

Posted: Tue Apr 17, 2007 9:32 am
by apicito
I need compose a document for print without user intervenction.

Posted: Tue Apr 17, 2007 10:47 am
by Sergey Tkachenko
Why not to use several AddNLs then?

Posted: Tue Apr 17, 2007 12:03 pm
by apicito
Because is the same paragraph and addN insert a new line.

Posted: Tue Apr 17, 2007 6:25 pm
by Sergey Tkachenko
AddNL can add text in the same paragraph, pass -1 to ParaNo parameter:

Code: Select all

with table.Cells[0,0] do begin
  Clear;
  AddNL( 'aaaaaaaaaaaaaaaaaaaaa ', 7, 3);
  AddNL( cargo, 8, -1);
  AddNL( 'bbbbbbbbbbbbbbbb', 7, -1);
end;

Posted: Wed Apr 18, 2007 7:57 am
by apicito
thanks