Hi,
I need to have a transparent UltraLabel on UltraPanel with Gradient. Currently, the problem is UltraLabel shows the background color of the form and I need it to be transparent so that 'ugly' white background will go away.
Thanks in advance,
Hello Ajay,
In order to do so, you would have to set the BackColor property of the UltraLabels to Transparent, so they will "show" the color beneath them.
Please feel free to let me know if you need any other assistance with this matter.
Thanks for the reply. I tried that but doesnt work.
I am still following this forum thread. Have you been able to take a look at your application and verify what is version of the controls being used?
Please do not hesitate to contact us if you have any other questions with this matter.
I am seeing this same problem when I place an UltraLabel over a PictureBox with an image. The transparency of the UltraLabel is the default, which is 0, but I am still seeing the form background color on the label, not the image in the PictureBox.
I see this with version 2012 Vol 2.
Keith
Hi Keith,
This will not work with a PictureBox because Picturebox is not a container. I tried it out and it doesn't work with any control, including UltraLabel or the inbox Label control.
The way transparency works in DotNet is that when a control is transparent and it gets a paint message, it asks it's parent control to paint for it. Since the PictureBox is not a container, the label asks it's parent, the Form, to paint.
Anyway, why don't you just use a panel or an UltraPanel instead of a PictureBox?
I have a similar problem except I am not dropping the label on top of a picture box, but rather on top of ultratabcontrol's tab header.
Is there a way to get the ultralabel to show the tab header's color?
Transparency will only work if the label is contained by the Tab control. It has to actually be contained within the Controls collection of a parent control - not just positioned on top of it in the ZOrder. So I don't think there is any way to do this.
The best you could do is set the BackColor on the label to the resolved backcolor of the tab.
There is no property. Many properties influence the colors, so the colors are resolved via a method:
AppearanceData appData = new AppearanceData(); AppearancePropFlags flags = AppearancePropFlags.AllRender; this.ultraTabControl1.Tabs[0].ResolveAppearance(ref appData, flags); Debug.WriteLine(appData.BackColor, "BackColor"); Debug.WriteLine(appData.ForeColor, "ForeColor");
Note that this will not be accurate unless you have turned off themes. There is no way to get the themed colors as far as I know.
I figured as much. Do you happen to know which property on the tab control has the resolved appearance? I tried to use TabHeaderAreaApperance but it is just default values.