Works quite nicely thusly:
procedure TCamForm.Memo1Click(Sender: TObject);
begin
memo1.TabStop := True; // gets the blinkin cursor
memo1.Color := clWhite;
CreateCaret(memo1.Handle, 0, memo1.Font.Size,memo1.Font.Size*2);
// memo1.Font.Size*2 (height should be double to look tiddly)
SetCaretPos(0,0);
ShowCaret(memo1.Handle);
end;
procedure TCamForm.Memo1Exit(Sender: TObject);
begin
Memo1.modified := true;
if (memo1.Lines[0] <> '') or (memo1.Lines.Count > 0) then memo1.Color :=
clwhite
else memo1.Color := clGray;
memo1.tabstop := False; // stops the blinkin cursor
DestroyCaret; // hide the carrot
end;
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz