How to make a watermarked Memo? lazarus / 31-LCL ---------------------------------------------------------------------- loaded · 2024-03-18 08:17 Hi All, I have a form with multiple memos. In terms of visuality, I want to add watermark to these memos. It may look similar to the view in the example. Is this possible ? ---------------------------------------------------------------------- rvk · 2024-03-18 09:04 Problem is that TMemo doesn't have Paint or Canvas. You could use PaintTo or TControlCanvas over TMemo but you would need to update it each time TMemo updates/repaints itself. Small example with buttonpress. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure AngleTextOut(ACanvas: TCanvas; Angle, X, Y: Integer; Text: string);var  NewFontHandle,  OldFontHandle: hFont;  LogRec       : TLogFont;begin  GetObject(ACanvas.Font.Handle, SizeOf(LogRec), Addr(LogRec));  LogRec.lfEscapement := Angle * 10;  LogRec.lfOrientation := LogRec.lfEscapement;  NewFontHandle := CreateFontIndirect(LogRec);  OldFontHandle := SelectObject(ACanvas.Handle, NewFontHandle);  ACanvas.TextOut(X, Y, Text);  NewFontHandle := SelectObject(ACanvas.Handle, OldFontHandle);  DeleteObject(NewFontHandle);end; procedure TForm1.Button1Click(Sender: TObject);var  AC: TControlCanvas;begin  AC := TControlCanvas.Create;  try    AC.Control := Memo1;    AC.Brush.Style:=bsClear; // transparent    AC.Font.Name := 'Arial';    AC.Font.Color := clGray;  AC.Font.Size := 60;    AngleTextOut(AC, 45, 10, 180, 'Header');  finally    AC.Free;  end;end; Maybe someone can come up with a better idea ---------------------------------------------------------------------- loaded · 2024-03-18 10:39 I would like to thank you as much as the number of characters in your answer, rvk. Yes, this could be a solution, but it has some problems, the most obvious of which is; The watermark remains on the text. If a more minimal and trouble-free solution does not come up, I will try to use this. But for now, as you said; Quote from: rvk on March 18, 2024, 10:04:55 amMaybe someone can come up with a better idea ---------------------------------------------------------------------- RayoGlauco · 2024-03-18 12:09 Here is a similiar question, with its solution, for Delphi. Maybe it can inspire you: https://stackoverflow.com/questions/55899526/how-to-draw-a-colored- line-to-the-left-of-a-tmemo-which-looks-like-a-gutter ---------------------------------------------------------------------- rvk · 2024-03-18 12:14 I already tried to make TMemo transparent but that doesn't work (like it does in Delphi). With TRichMemo it does (it also has a Transparent property). With TSynEdit there should also be multiple possibilities (because it has a Paint event and otherwise could also be made transparent). But the TMemo has serious limitations in Lazarus (maybe due to the cross-platform capabilities). ---------------------------------------------------------------------- jamie · 2024-03-18 12:17 For windows a transparent panel overlay ---------------------------------------------------------------------- loaded · 2024-03-18 19:37 RayoGlauco and jamie, thank you very much for your answers. It scared me that the situation had become so complicated. As I mentioned above, I only wanted this for visuality. Quote from: rvk on March 18, 2024, 01:14:38 pmBut the TMemo has serious limitations in Lazarus (maybe due to the cross-platform capabilities). I think you're right, I'll stick to using text tags for now.  Respects.