trichview.com

trichview.support




List Index Out Of Bounds???


Return to index


Author

Message

Jamie

Posted: 12/04/2002 21:26:06


Here's a new twist to my dilema.. I cannot add a table without calling

Format after InsertRVFFromStream as it gives me a List Index Out Of Bounds

Error...???


Here's my code...



  // Insert the Header...

  Stream := TMemoryStream.Create;

  SettingsForm.Headerrve.SaveRVFToStream(Stream,False);


  EMailForm.rve.Clear;

  Stream.Position := 0;


EMailForm.rve.InsertRVFFromStream(Stream,SettingsForm.Headerrve.ItemCount);

  Stream.Free;


  // insert the Title...

  EMailForm.rve.AddNL('',0,0);

  EMailForm.rve.AddNL('',0,0);

  EMailForm.rve.AddNL(DM.OfferFaxQuery.FieldByName('Title').AsString,4,1);

  EMailForm.rve.AddNL('',0,0);

  EMailForm.rve.AddNL('',0,0);


  // Insert the table...

  table := TRVTableItemInfo.CreateEx(DM.OfferFaxQuery.RecordCount+1,6,

EMailForm.rve.RVData);


  table.BorderStyle := rvtbRaisedColor;

  table.CellBorderStyle := rvtbLoweredColor;


  table.BorderLightColor := clBlack;

  table.BorderColor := clBlack;

  table.CellBorderLightColor := clBlack;

  table.CellBorderColor := clBlack;

  table.Color := clWhite;


  table.BorderWidth := 1;

  table.CellBorderWidth := 1;

  table.CellPadding := 1;

  table.CellVSpacing := 1;

  table.CellHSpacing := 1;

  table.BorderVSpacing := 1;

  table.BorderHSpacing := 1;


  for r := 0 to table.Rows.Count-1 do

    for c := 0 to table.Rows[r].Count-1 do

      table.Cells[r,c].BestWidth := 60;


  EMailForm.rve.InsertItem('', table); // This line causes a List Index Out

Of Bounds Error...









Powered by ABC Amber Outlook Express Converter