Text from Edit to itemtext in table
Posted: Tue Aug 17, 2010 1:41 pm
My code:
By the second pressing of a key there is an error: list index out of bounds (1)
How it to avoid?
Code: Select all
procedure TForm8.Edit2Change(Sender: TObject);
var t : TRVtableitemInfo;
s : trvtextiteminfo;
i, i1 : integer;
begin
t := (SRichViewEdit1.RichViewEdit.RVData.Items.Objects[0] as TRVtableItemInfo);
t.Cells[0, 0].SetItemText((sender as tedit).Tag, (sender as tedit).Text);
t.EditCell(0, 0);
SRichViewEdit1.RichViewEdit.SetFocus;
edit2.SetFocus;
Edit2.SelLength := 0;
edit2.SelStart := length(edit2.Text);
end;
How it to avoid?