trichview.com

trichview.support




Re: Tables


Return to index


Author

Message

Carlo Kok

Posted: 07/06/2002 16:38:26


"ANNA" <marytd6513@hotmail.com> wrote in message

news:3d270608@support.torry.net...

> Yes, you are right.

> This what I try to do. but I couldn't do it. I'm out off alignment

>


Something like:


procedure TForm1.BitBtn2Click(Sender: TObject);

var

  I, J, K : Integer;

  table: TRVTableItemInfo;

  r,c: Integer;

Begin

  table :=

TRVTableItemInfo.CreateEx(StringGrid1.ColCount,Stringgrid1.rowcount,

RichViewEdit1.RVData);


  table.Color := clNone;

  table.BorderStyle := rvtbColor;

  table.CellBorderStyle := rvtbColor;


  table.BorderWidth := 1;

  table.BorderVSpacing := 1;

  table.VRuleWidth := 1;

  table.HRuleWidth := 1;

   for J:=0 to StringGrid1.RowCount -1 do

   begin

   for I := 0 to StringGrid1.ColCount - 1 do

   begin

      table.Cells[j,i].BestWidth := 40;

      table.Cells[j,i].Clear;

      table.Cells[j,i].AddFmt(StringGrid1.Cells[I,J],[r,c],0,0);

      table.Cells[j,i].DoJump(1);

      table.Cells[j,i].Color := clwhite;

    end;

    end;

    RichViewEdit1.InsertItem('', table);

//Insert new line to RichViewEdit1 or start new row.

   RichViewEdit1.InsertText(#10#13);

end;



Ck





Powered by ABC Amber Outlook Express Converter