Help. Using Tab in TRichEdit



with RichEdit1 do
begin
Pos := FirstPos;
AdsOrderDtl.First;
while not AdsOrderDtl.Eof do
begin
try
PrintWidth := uColWidth * MulDiv(Canvas.TextWidth('X'), 72,
Canvas.Font.PixelsPerInch);
SelStart := 0;
SelLength := 0;
Paragraph.TabCount := 6;
Paragraph.Tab[0] := 0;
Paragraph.Tab[1] := 30;
Paragraph.Tab[2] := 60;
Paragraph.Tab[3] := 150;
Paragraph.Tab[4] := 360;
Paragraph.Tab[5] := 420;
Other code that writes to RichEdit1 using
Lines.Add('');
SelText := #9+fields[i];
(they all work ok)
Next;

Except .....
end;
end;
Paragraph.TabCount := 2;
Paragraph.Tab[0] := 360;
Paragraph.Tab[1] := 420;
SelText :=#9+ 'SubTotal';
SelText :=#9+ subTotalcalculated;
SelText :=#9+ 'Freight';
SelText :=#9+ Freightcalculated;
SelText :=#9+ 'Total';
SelText :=#9+ orderTotalcalculated;
the above six setText don't work??????
end;

It seems the Paragraph.TabCount := 2; did not get registered.
Also if I don't use Paragraph.TabCount := 2; bla, bla, bla
but continue to use the original tab setting defined
SelText := #9#9#9#9 + somestring does not go to the fourth tab (at 150).
Can someone tell me what is wrong with this code?

Thanks.

Chris


.