Registriert seit: 21. Aug 2003
7.332 Beiträge
Delphi 2009 Professional
|
Re: [JvRichEdit] Smilies einfügen
13. Jul 2005, 13:36
Hi,
hier mal ein Q&D-Beispiel:
Delphi-Quellcode:
procedure TForm1.DoSmilies(aJvRichEdit: TJvRichEdit);
var
Pos: Integer;
Bitmap: TBitmap;
begin
Pos := aJvRichEdit.FindText(':-)', 0, Length(aJvRichEdit.Text), []);
if Pos = -1 then
exit;
Bitmap := TBitmap.Create;
try
ImageList1.GetBitmap(0, Bitmap);
aJvRichEdit.SetSelection(Pos, Pos + 3, true);
aJvRichEdit.InsertGraphic(Bitmap, false);
aJvRichEdit.SelStart := Length(aJvRichEdit.Text);
finally
Bitmap.Free;
end;
end;
|
|
Zitat
|