We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Making a user control transparent

Thread ID:

Created:

Updated:

Platform:

Replies:

19509 Sep 28,2004 09:41 AM UTC Jul 13,2007 02:20 PM UTC Windows Forms 3
loading
Tags: FAQ
Jon
Asked On September 28, 2004 09:41 AM UTC

Hi, I am trying to create a user control and I want to set its background to be transparent; however, when I do this I get an error "This control does not support transparent background colors." I have been looking around for how to enable transparent backgrounds for a user control with no luck. I have tried a number of things by overriding "OnPaintBackground"; however, none of them have worked and I end up with garbage leaking thru from somewhere else even though the control my user control is a child of has a background. The reason I want to do this is I am using the syncfusion tab control and I am using themes. I want to be able to place my user control on the tab page and have the theme background show through behind labels and other controls on my user control. Thank you, Jon

Rik Hemsley
Replied On October 6, 2004 10:24 AM UTC

Try changing the FlatStyle property of your UserControl. I know if you set the FlatStyle of a Label back to Standard when it was System, you can then set a transparent background colour.

Administrator [Syncfusion]
Replied On April 17, 2005 06:04 PM UTC

>Hi, > >I am trying to create a user control and I want to set its background to be transparent; however, when I do this I get an error "This control does not support transparent background colors." I have been looking around for how to enable transparent backgrounds for a user control with no luck. I have tried a number of things by overriding "OnPaintBackground"; however, none of them have worked and I end up with garbage leaking thru from somewhere else even though the control my user control is a child of has a background. > >The reason I want to do this is I am using the syncfusion tab control and I am using themes. I want to be able to place my user control on the tab page and have the theme background show through behind labels and other controls on my user control. > > >Thank you, >Jon

Mayank
Replied On July 13, 2007 02:20 PM UTC

Hi Rik,
I am trying to make background of UserControl transparent, but after trying hard i never found anything which solve it. It seems to me that you are having some clue as per your message like "FlateStyle". Please let me know if you have something which help me to come out from this problem.

Thanks in Advance




>Try changing the FlatStyle property of your UserControl. I know if you set the FlatStyle of a Label back to Standard when it was System, you can then set a transparent background colour.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;