views:

161

answers:

3

Is there any way to make a control transparent like button, edit, panel or etc...? I mean something like capacity or alpha blend that we have in form property.

A: 

alpha is usually the first 2 digits in a hex number....

typical hex is #FFFFFF a hex with opacityinformation is #FFFFFFFF which would be white at full opacity #00FFFFFF would be white at 0 opacity...

you should also be able to set the background to transparent. If you are looking to make the whole control disappear you can simply hide it...what are you trying to achieve?

ecathell
as I said I am trying to set opacity property for a control! for example.... when you are looking to a panel with some objects, you be able to see behind that too! Hope it be clear. Thanks
Armin
By the way a control like TButton or TBitBtn has no color property.
Armin
yea sorry, I didnt realize I had wasnt still in the WPF tags when I was answering this.
ecathell
+1  A: 

Take a look at the Win32 windows styles, especially WS_TRANSPARENT (or WS_EX_TRANSPARENT).

I've seen that work on Windows. I'm not sure if it does on components though... will have to research it sometime.
Dian
+1  A: 

I don't think you can make components transparent through a property (in my very little experience), except for those components which you can choose 'none' as a color(usually you have to download these). For instance TAdvSmoothPanel, but its transparency has limits.

You should try googling Delphi transparent components, there are downloadable components and tricks you can do to make existing components transparent.

Dian
I googled it over 6 months and found no useful solution. It can happen because i have 3 reasons: 1- When a form can have it, other controls can have it too! 2- I've seen that in some applications 3- Anything is possible in programming, especially when you are using DELPHI! Thanks at all.
Armin
Oh, what I meant to say was I didn't think it was possible to make a component transparent by changing a property. I have actually tried making a panel transparent (not my code though), this is what I meant by tricks to make existing components transparent. I've never actually found a code that works on every component, but most of them manipulate/override/deal with the Paint procedure/method.
Dian