I have such a question for the experts, is it possible to make the RichEdit component transparent, or is it basically impossible and if it is not possible, then you can tell some component similar to it, but with the transparent property. Maybe someone ever wrote a similar component and he can share his experience.

  • Transparent vryatli. But the invisible is quite real - Visible set false. - new_russian_man

1 answer 1

The simplest thing to do here is the following:

  1. We set the RichEdit color property of a color that the text will not exactly (or change while the program is running);
  2. At the form itself we set TransparentColor - True, and TransparentColorValue select the color that was set on the Color of the RichEdit component (or set all this programmatically on the OnCreate form handler).

It is enough to put some non-standard color on the OnCreate form handler, for example, RGB (255,255,254) - white for the eye, but not for the computer (TransparentColorValue and Color of the RichEdit component) so that everything works, as the text color is usually selected in FontDialog- e from the list of standard.

PS I recently answered a similar question here, the question: "Displaying text on canvas in Delphi". There I laid out the code, if anything, it can be useful.