Improve company productivity with a Business Account.Sign Up


convert a hex value to a color value

Posted on 2000-02-20
Medium Priority
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
LVL 17

Accepted Solution

inthe earned 40 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Through the video, you can check the migration process of Outlook PST file to PDF. Kernel for Outlook to PDF tool can convert Outlook emails with all attributes like Subject, To, From, Cc, Bcc and other folders such as Inbox, Outbox, Sent Items, Jun…
Watch the video to know the process of migration of Exchange or Office 365 mailboxes in absence of MS Outlook. It is an eminent tool which can easily migrate Public, Archive user mailboxes from one another Exchange server and Office 365. Kernel Migr…

606 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