Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Component Colour

Posted on 1999-06-27
6
Medium Priority
?
129 Views
Last Modified: 2010-04-06
Is there any way to give a component a color other than the available choices. Maybe use hexadecimal?

Cheers
xpher
0
Comment
Question by:xpher
[X]
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
  • 3
  • 3
6 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 80 total points
ID: 1384824
hi
yes you can do this like so:

procedure TForm1.FormCreate(Sender: TObject);
begin
memo1.color:=$00E8FCFF;  {a yellowish color}
end;

is that what you were after?
Regards Barry
0
 
LVL 17

Expert Comment

by:inthe
ID: 1384825
btw
if you need a list of hex colors ,i got mine from a website for teaching html which as you probably know uses hex for the colors.maybe you have a list in a html book...
i could probably find you a list if you need ,just say if so..

Barry
0
 
LVL 1

Author Comment

by:xpher
ID: 1384826
Many thanks (again) Barry. Yes I have got a list of colours.

Cheers
Chris :))
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:xpher
ID: 1384827
Hi
A problem. The color with hexadecimal #A50000 is supposed to be a deep red. If I use $A50000 it is blue (a very nice blue but not red). Any ideas?

Cheers
Chris :)(
0
 
LVL 17

Expert Comment

by:inthe
ID: 1384828
LOL,Yes i just tried that and is very blue :-)

the answer seems to be everything is backwards.
ie:
procedure TForm1.FormCreate(Sender: TObject);
begin
 memo1.color:=$0000A5; {this = deep red}{nice color btw}
end;

it goes $(hex)00(blue)00(green)00(red)
so ff0000 is blue not red as should be..
strange huh :-)
Regards Barry
0
 
LVL 1

Author Comment

by:xpher
ID: 1384829
Many thanks Barry (again)(again).

Cheers
Chris:))
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

670 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