edit canot display the caret
Posted: Wed Sep 15, 2010 3:52 pm
when i insert a Tedit into cells,but Tedit can not dispaly the caret?
Code: Select all
procedure TForm2.btn1Click(Sender: TObject);
var i:Integer;
begin
srvedit1.RichViewEdit.Clear;
if dlgOpen1.Execute then
begin
srvedit1.RichViewEdit.LoadRTF(dlgOpen1.FileName) ;
end;
srvedit1.RichViewEdit.Format;
for i := 0 to srvedit1.RichViewEdit.RVData.ItemCount - 1 do
begin
if srvedit1.RichViewEdit.GetItemStyle(i) = rvsTable then
begin
tab:=TRVTableItemInfo(srvedit1.RichViewEdit.RVData.GetItem(i));
//break;
end;
end;
tab.OnCellEditing:=onCellEditing;
//tab.Cells[0,1].AddControlEx('default1',edt2,-1,rvvaAbsMiddle);
tab.Cells[2,1].AddControlEx('default2',edt1,-1,rvvaAbsMiddle);
srvedit1.RichViewEdit.Format;
end;