Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Color of disable - gray
Message
From
20/12/2000 13:35:17
 
 
To
19/12/2000 16:36:01
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00455216
Message ID:
00455500
Views:
26
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
Previous
Reply
Map
View

Click here to load this message in the networking platform