Page 1 of 1

With the clicks cell the content a spreadsheet in Edit shows

Posted: Sat Jul 19, 2008 12:30 pm
by Jmich
With the clicks one single table cell the cell-content with Edit shows. Who can help?



Thank you

JM

Posted: Sun Jul 20, 2008 7:00 pm
by Sergey Tkachenko
Sorry, I do not understand your question.

Posted: Mon Jul 21, 2008 6:07 pm
by Jmich
if I click on a cell in a table of Richviewedit, this content of the cell in a Tedit field should be shown.

For example: if select rich_table.Cells[r,c] = true then
begin
edit1.Text := rich_table.cells[r,c];
end;

How can of working?


Many greetingses

Jmich

Posted: Tue Jul 22, 2008 12:44 pm
by Sergey Tkachenko
Use OnRVMouseDown event.

Code: Select all

procedure TForm3.RichViewEdit1RVMouseUp(Sender: TCustomRichView;
  Button: TMouseButton; Shift: TShiftState; ItemNo, X, Y: Integer);
begin
  if (Button<>mbLeft) or (Shift<>[]) then
    exit;
  if RichViewEdit1.InplaceEditor<>nil then
    Edit1.Text := GetAllText(RichViewEdit1.TopLevelEditor)
  else
    Edit1.Text := ''; // not a cell
end;
GetAllText is declared in RVGetText unit.
Note: it may return multiline text.