Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting forecolor in disabled textbox
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Setting forecolor in disabled textbox
Divers
Thread ID:
00892517
Message ID:
00892517
Vues:
57
Anyone know how to set disabled forecolor to black instead of default gray in textbox and other controls. Thread 72355 seemed to address this without success.

This is my attempt, backround colors work fine, forecolor does not:


System.Drawing.Color fc; // set forecolor black
fc = System.Drawing.Color.Black;

System.Drawing.Color bc;
if (tf == true)
bc = System.Drawing.Color.White; // enabled backround color
else
bc = System.Drawing.Color.Gainsboro; // disabled backround color

textBox1.Enabled = tf;
textBox1.BackColor = bc;
textBox1.ForeColor = fc;


Didnt expect to be dealing with this type of goofiness in .Net...

Many thanks,

Todd
The day you take complete responsibly for yourself, the day you stop making any excuses, thats the day you start to the top. - O.J. Simpson

Great advice from a questionable source...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform