GradientBrush, Transparency and ContainerControl!

Ö

Özden Irmak

Hello,

I've several controls which I fill with a GradientBrush. That Brush has an
endcolor as Transparent. I also fill it using a GraphicsPath. This container
control does also support transaprentbackground, set via SetStyle.

In non-container controls, this works well. But in Container controls, I get
graphical glitches and also if I put another control into that container
control which have transparent background, they are not painted as
transparent.

Is this a known problem, any solution?

Regards,

Özden
 
M

Michael Powell

sorry for the double post, if i modify a mail in the outbox, then my outlook
express sends 2 copies of it, and i can't send anything but ZIPs or DOCs as
attachments
 
Ö

Özden Irmak

Hello Mick,

Thanks for your suggestion, but unfortunately I can't use the option,
setting a region to the control. These control are part of a commercial
component suite and the design-time behaviours of the controls should be the
exact as the other .Net controls. As you know when you set a region,
transparent parts won't answer to mouse events and also there will be a huge
performance problem.

Thanks,

Özden

"Mick Doherty"
 
M

Mick Doherty

I didn't mean the Region part. If you look a little closer at the code
before the region assignment you will see code that paints the background to
make it appear transparent, basicly it's just calls to
InvokePaintBackground() and InvokePaint() with some Translation to get the
correct bounds. The Region assignment in that example was to show how to
achieve smoothing of a shaped controls edges.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


Özden Irmak said:
Hello Mick,

Thanks for your suggestion, but unfortunately I can't use the option,
setting a region to the control. These control are part of a commercial
component suite and the design-time behaviours of the controls should be
the exact as the other .Net controls. As you know when you set a region,
transparent parts won't answer to mouse events and also there will be a
huge performance problem.

Thanks,

Özden

"Mick Doherty"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top