Page 1 of 1
Color DataBand
Posted: Thu Apr 06, 2017 9:06 pm
by Leandro Borges
Hello.
In my database I have the whole number of a color. Is it possible to convert this number into a color and paint the band?
Thank you.
Re: Color DataBand
Posted: Fri Apr 07, 2017 11:14 am
by HighAley
Hello, Leandro.
You could set the color using the Before Print event of the Band.
Code: Select all
((sender as StiDataBand).Brush as StiSolidBrush).Color = Color.Blue;
Thank you.
Re: Color DataBand
Posted: Fri Apr 07, 2017 9:18 pm
by Leandro Borges
Hello.
It worked. But it has another detail, if the color is dark, the text component the band needs to change its color to a light color and vice versa. Is there a function that identifies whether the color is light or dark?
Thank you.
Re: Color DataBand
Posted: Mon Apr 10, 2017 8:58 am
by Alex K.
Hello,
Unfortunately, the are not functions for this task.
You need check it in you code.
Thank you.
Re: Color DataBand
Posted: Mon May 08, 2017 12:43 pm
by Leandro Borges
Hello,
Ok.
Thank you.
Re: Color DataBand
Posted: Mon May 08, 2017 1:19 pm
by Andrew
Leandro,
We are always glad to help you.