Link to home
Start Free TrialLog in
Avatar of pin_plunder
pin_plunder

asked on

convert a hex value to a color value

edtCeldaColorFondo.Text contains the hex value

and i'm trying to do something like this

edtCeldaMuestraBorde.Color := edtCeldaColorFondo.Text;

but obviously this code doesn't work.

please help me, thanks
ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PeterLarsen
PeterLarsen

Tcolor is an integer, so this will also do :

edtCeldaMuestraBorde.Color := integer(edtCeldaColorFondo.Text);

or if you have hex values :

edtCeldaMuestraBorde.Color := stringtocolor('$'+edtCeldaColorFondo.Text);
Avatar of pin_plunder

ASKER

thanks