PDA

View Full Version : Transparency



Voltrox
20-01-2007, 06:57 PM
Hello.

Is it possible to have a transparent Listbox in Delphi?

And possibly a transparent Memo/textbox?

What are my options?

Thank you...

:)

JernejL
20-01-2007, 08:13 PM
what a coincidence! i was just working on a very similar thing, i have a Tlistbox which is owner drawn to show a background image, and a Tedit with a bitmap background, which gives a illusion of transparency.

interested in any of these?

AthenaOfDelphi
20-01-2007, 08:17 PM
As far as I know, the only way to achieve transparency in the standard controls is to not use the standard controls and to draw them yourself.

Which, depending on the exact functionality you require, can be quite a lot of work.

Voltrox
20-01-2007, 10:01 PM
I don't think the background image would help. There is a background for the program's interface and I would want that to show through the boxes, but if I used your background thing I would have to remake it and cut parts of it out.

How would I draw it myself?

Voltrox
21-01-2007, 01:42 AM
Also, are there any other options other than drawing the listbox myself?

czar
21-01-2007, 02:58 AM
I copy part of the background underneath the control and paint the control with it. Works rather well to simulate transparency.

JernejL
21-01-2007, 04:50 AM
you could try alphablending & colorkeying the edit with win2k introduced window transparency on another form..

Voltrox
21-01-2007, 07:59 PM
I don't know what that means.

cairnswm
22-01-2007, 06:35 AM
Do a google search for "Delphi Transparent Listbox" and there are tons of resources on how to do it.

To make a listbox transparent there are some windows messages that need to be changed.

Try this link:
http://www.swissdelphicenter.ch/torry/showcode.php?id=1982