Copy content of a cell to another cell of the same table
Posted: Tue Sep 02, 2014 9:54 am
Hello,
I want to copy the cell-content (text with attributes) without marking to clipbord. Then I want to insert clipboard-text into a selected cell of the same / other table.
My solution is not satisfactory:
- rveTable.Select(r,c,0,0); //copies cell-borderline too
- memo.selectCurrentLine; //copies only the first line (the currentline)
What is to do to copy cell to cell (content is text with attributes or rotated text or images ....)
procedure TForm1.Zellinhaltkopieren1Click(Sender: TObject);
begin
if (memo.GetCurrentItemEx(TRVTableItemInfo, rve, TCustomRVItemInfo(rveTable))) then begin
rveTable.GetEditedCell(rveTzeile1,rveTspalte1);
if rveTable.Cells[rveTzeile1,rveTspalte1]<>nil then rveTable.Select(rveTzeile1,rveTspalte1,0,0);
end;
//memo.selectCurrentLine;
memo.copyDef;
rveTable.deselect;
end;
procedure TForm1.KopiertenZellinhalteinfgen1Click(Sender: TObject);
begin
SendMessage(ActiveControl.Handle,WM_PASTE,0,0);
end;
I want to copy the cell-content (text with attributes) without marking to clipbord. Then I want to insert clipboard-text into a selected cell of the same / other table.
My solution is not satisfactory:
- rveTable.Select(r,c,0,0); //copies cell-borderline too
- memo.selectCurrentLine; //copies only the first line (the currentline)
What is to do to copy cell to cell (content is text with attributes or rotated text or images ....)
procedure TForm1.Zellinhaltkopieren1Click(Sender: TObject);
begin
if (memo.GetCurrentItemEx(TRVTableItemInfo, rve, TCustomRVItemInfo(rveTable))) then begin
rveTable.GetEditedCell(rveTzeile1,rveTspalte1);
if rveTable.Cells[rveTzeile1,rveTspalte1]<>nil then rveTable.Select(rveTzeile1,rveTspalte1,0,0);
end;
//memo.selectCurrentLine;
memo.copyDef;
rveTable.deselect;
end;
procedure TForm1.KopiertenZellinhalteinfgen1Click(Sender: TObject);
begin
SendMessage(ActiveControl.Handle,WM_PASTE,0,0);
end;