Solved

convert a hex value to a color value

Posted on 2000-02-20
3
151 Views
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
0
Comment
Question by:pin_plunder
3 Comments
 
LVL 17

Accepted Solution

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

Regards Barry
0
 
LVL 2

Expert Comment

by:PeterLarsen
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);
0
 

Author Comment

by:pin_plunder
ID: 2540610
thanks
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now