Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Color of disable - gray
Message
De
20/12/2000 13:35:17
 
 
À
19/12/2000 16:36:01
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00455216
Message ID:
00455500
Vues:
27
Chuck:

> Is there a way to change the background color of the fields upon
> enable/disable?

Yes. The easiest solution to code is to add conditional code (on the Enabled and ReadOnly properties) in the Refresh method of all your base classes. The user should have some control over these settings. If you provide a facility (form) to allow the user to change the colors, you can code something like the following in base textbox class.

With This
Do Case
Case .Enabled And Not .ReadOnly
.ResetToDefault('ForeColor')
.ResetToDefault('FontBold')
Case .Enabled And .ReadOnly
.DisabledBackColor = goSettings.ReadOnlyBackColor
.ForeColor = goSettings.ReadOnlyForeColor
.FontBold = goSettings.ReadOnlyFontBold
Otherwise
*-- Control is not enabled
.DisabledBackColor = goSettings.DisabledBackColor
.DisabledForeColor = goSettings.DisabledForeColor
.FontBold = goSettings.DisabledFontBold
EndCase
EndWith

where goSettings is a public object that stores the user choice of colors
for normal, read-only and disabled controls.

Daniel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform