Select cell content on entering table cell

General TRichView support forum. Please post your questions here
Post Reply
erich_k4
Posts: 4
Joined: Fri Nov 25, 2005 12:15 pm

Select cell content on entering table cell

Post 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
Sergey Tkachenko
Site Admin
Posts: 17499
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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;
erich_k4
Posts: 4
Joined: Fri Nov 25, 2005 12:15 pm

Post by erich_k4 »

that's ok, thank you for the hint
Post Reply