Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# Control - Transparent Label
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01259615
Message ID:
01259892
Vues:
15
Did you use the code I posted? Make sure you set the property HacerTransparente = true.

Enmanuel



>I'm still not getting it. Why can't I make a label transparent????
>
>I found this article, but I need help understanding what it's telling me to do.
>http://msdn2.microsoft.com/en-us/library/wk5b13s4.aspx
>
>
>
>
>>You'd need to set the control style to support transparency
>>
>>
>> private bool _HacerTransparente;
>>        public bool HacerTransparente
>>        {
>>            get { return _HacerTransparente; }
>>            set
>>            {
>>                _HacerTransparente = value;
>>
>>                this.SetStyle(ControlStyles.SupportsTransparentBackColor, _HacerTransparente);
>>                if (_HacerTransparente)
>>                {
>>                    BackColor = Color.Transparent ;
>>                }
>>                else
>>                {
>>                    BackColor = BackGroundColor;
>>                }
>>            }
>>        }
>>
>>
>>HTH,
>>
>>Enmanuel
>>
>>>I have tried both, and it has no effect. The label is not transparent.
>>>
>>>I have a panel control with a picturebox in it of a gradient. The label is then on top of the gradient. The label appears as black text inside a white rectangle.
>>>
>>>
>>>
>>>
>>>>>How do I set the background of a label to transparent?
>>>>
>>>>
>>>>this.MyLabel.BackColor = System.Drawing.Color.Transparent;
>>>>
>>>>
>>>>Or, from the PropertySheet's color picker, choose the Web tab to find the Transparent color.
>>>>
>>>>~~Bonnie
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform