convert a hex value to a color value

Posted on 2000-02-20
Last Modified: 2010-04-04
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
Question by:pin_plunder
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 17

Accepted Solution

inthe earned 10 total points
ID: 2540186
you can use the
 edtCeldaMuestraBorde.Color := stringtocolor(edtCeldaColorFondo.Text);

Regards Barry

Expert Comment

ID: 2540320
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);

Author Comment

ID: 2540610

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question