PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Edit Control - Text Color
Edit Control - Text Color
Iniciado por derek.theobald, 30,jun. 2003 03:15 - 1 respuesta
Publicado el 30,junio 2003 - 03:15
Hi
Using a form for data entry and edit and want to highlight the text of manadatory fields during data entry as iLightRed
I seem to be able to change the color of everthing except this
How do I (can I) change the color of the caption text for an Edit control?
Better still can I do this on a group?
Regards
DT
Publicado el 30,junio 2003 - 05:30
G'day DT
The control properties are
myself..brushcolor = whatever colour for the background
myself..color = whatever colour for the text
They can apply equally to a control or a group
If you want to set the colours dynamically and set a definable colour based on whether a field is a mandatory field then you will need to roll your own in terms of control init code accessing either a data dictionary or an array of control attributes to determine if a field is mandatory as I don't think you can extract the "required" control logic from Windev. It was not possible in 5.5 but maybe it is different in 7.5
If you manage the "required" aspect yourself then you will also need exit code for validations.
Otherwise just hard code each field with code or create a control style and use it exclusively for mandatory fields. The colours can also be kept in another table which makes them easy to change on a global basis
myself..brushcolor = colours.RequiredFieldBackgroundColour
myself..color = colours.RequiredFieldTextColour
The selectcolor() command will open up the windows colour dialog and return the chosen colour integer.
Regards
Al