Board index » delphi » Transparent TEdit

Transparent TEdit

Is there a way to make a TEdit Transparent. Like the label.

I need to use the TEdit because of its capabilities.

Thanks.

P.S I tried to make a TEditExt Component derived from TEdit and set the
Canvas.Brush.Style to bsClear but did not work.

 

Re:Transparent TEdit


TEdit is a wrapper around the MS windows edit control (see win32.hlp
for edit controls). Tweaking its painting is much more complicated as
you believe. Only one example: When it scrolls text horizontal (in
order to keep the cursor visible), it moves the window content (see
ScrollDC and ScrollWindowEx in win32.hlp) instead of repainting
(imagine what happens to the background). And it doesn't notify you
about this.
You would have to track all changes of the edit's contents and the
cursor position and do all painting yourself.
In c't (a german computer mag) a programmer demonstrated how to do
what you want. It was several hundred lines of code (700 IIRC), and it
satisfied him not fully.

On Fri, 15 Oct 1999 10:42:01 -0500, "Alberto" <chap...@bellsouth.net>
wrote:

Quote
>Is there a way to make a TEdit Transparent. Like the label.

>I need to use the TEdit because of its capabilities.

>Thanks.

>P.S I tried to make a TEditExt Component derived from TEdit and set the
>Canvas.Brush.Style to bsClear but did not work.

Other Threads