Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

assign color to foreground

Status
Not open for further replies.

pierrotsc

Programmer
Nov 25, 2007
358
US
I am trying to assign a grayscale color to a brush. I guess if i assign the color to the foreground, i can then assign it to the brush. So how do i Assign red=200 green=200 blue=200 to the foreground color?

Righ now, i use:
podncappform.shadowvalue.Canvas.Brush.Color :=200;
podncappform.shadowvalue.Canvas.FillRect(podncappform.shadowvalue.Canvas.ClipRect);

When I do that, it's like R=200 G=0 B=0.

Thanks to any wizard that can help me.
PO
 
The brush colors are type TColor.

To do what you're doing, look into the RGB function (If I recall correctly).

As in:
Code:
podncappform.shadowvalue.Canvas.Brush.Color :=RGB(200,200,200);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top