Transparrency

hi!
i was wondering how to make a textbox/Listbox Transparrent
how do i make this possible?

stian
LVL 2
joepeztAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

edeyCommented:
What kind of "transparent" attributes do you want?  This can be difficult, depending upon exactly how you want the control to operate.



GL
Mike
0
joepeztAuthor Commented:
i just want to eliminate the background color, so i can have a Timage in the background

please send a reply to my mail adress, stian@nano.no, im leaving home now :)

i get the mail on my cellphone..

stian
0
edeyCommented:
Should mention a couple of alt.'s:

-setting the control's canvas.bruh.style to bsClear will cause the control to be "clear", though it won't update properly

-setting the control's windowRGN allows for non-rectangular controls.  If the content doesn't change much you can for the edge of the control around the content.  Thing is, the "transparent" parts aren't really transparent, they just aren't there at all.

-The PaintDesktop function fills the clipping region in the specified device context with the desktop pattern or wallpaper.

-Create on owner draw control & copy whatever you think should be under the control on top of it.

GL
Mike
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

joepeztAuthor Commented:
ok... i'll try this...

though bsClear wont clear anything.. it just marks the entire string...

could you explain hos to use the brush thing and the ownerdraw ?

stian.. thanx for the help :-)
0
mrcalabCommented:
That's not so difficult, the only things you have to do are the following ones:
Set Textbox.canvas.brush.style to bsClear to make it background-less.

Then create a modified version of the TTextbox as following:

in interface part:

TNewTextBox = class(TTextbox)
private
procedure paint; override;
end;

in implementation-part:

Procedure TNewTextBox.Paint;
Begin
   bitblt(canvas.handle,0,0,clientwidth,clientheight,thebitmap.canvas.handle,0,0,srcCopy);
inherited paint;
End;

But you need in any case a canvas to be able to paint a picture in the background.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
edeyCommented:
that's pretty much it


GL
Mike
0
joepeztAuthor Commented:
hmm.. i was using a edit box, and it says paint is not defined in the Base Class...

where do i earn points?

stian

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.