...select a row in a Memo by clicking on it?
Author: Thomas Stutz
procedure TfrmMain.Memo1Click(Sender: TObject);
var
Line: Integer;
begin
with (Sender as TMemo) do
begin
Line := Perform(EM_LINEFROMCHAR, SelStart, 0);
SelStart := Perform(EM_LINEINDEX, Line, 0);
SelLength := Length(Lines[Line]);
end;
end;
printed from
www.swissdelphicenter.ch
developers knowledge base