Page 1 of 1

Select cell content on entering table cell

Posted: Mon May 16, 2011 3:04 pm
by erich_k4
Hello Sergey,

is there a way to select all the content of a table cell on editing the cell?
(maybe in the "onCellEditing"-Event)

e.g if a user enters a table-cell (by Key or Mouse-click) the content of this cell should automatically be selected

Thank you
Erich

Posted: Tue May 17, 2011 12:49 pm
by Sergey Tkachenko
It's only possible when entering cell with the keyboard:

Code: Select all

procedure TForm3.RichViewEdit1CaretMove(Sender: TObject);
const rve: TCustomRichViewEdit = nil;
begin
  if rve<>RichViewEdit1.TopLevelEditor then begin
    rve := RichViewEdit1.TopLevelEditor;
    if rve<>RichViewEdit1 then
      rve.SelectAll;
  end;
end;

Posted: Tue May 17, 2011 1:07 pm
by erich_k4
that's ok, thank you for the hint