AD
Administrator
Syncfusion Team
August 7, 2003 03:01 PM UTC
grid.AlphaBlendSelectionColor.
AD
Administrator
Syncfusion Team
July 17, 2004 04:11 AM UTC
>grid.AlphaBlendSelectionColor.
When try to set this property i couldn''t get the exact color. It is giving different color. Can you please help me on this?
Thanks
AD
Administrator
Syncfusion Team
July 17, 2004 06:11 AM UTC
We are using alphablending (the A part of the Color.FromArgb) to avoid having to redraw all teh cells.
When this value is less than 255, the underlying screen will bleed through so you can see it. The less the value, the more transparent the look. The reason to do this is that the selection then can be drawn by just filling a rectangle with this color.
If you actually want the background to have a non-blended color, then you would have to draw the contents of every cell with the desired backcolor. This would avoid the blending fade that you are commenting on. If you want this, you can do it by setting the alpha part of the selection color to 0 (so it does not show). Then you would handle PrepareViewStyleInfo and set the backcolor you want if teh cell is selected.
This thread shows how you can do this.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=13587
RA
Rabeek
July 17, 2004 08:38 AM UTC
Thanks Clay Burch, for your valuable reply. And I have posted new message of doubt on the Header Caption. Can you please help me on that?
Regards
Rabeek
>We are using alphablending (the A part of the Color.FromArgb) to avoid having to redraw all teh cells.
>
>When this value is less than 255, the underlying screen will bleed through so you can see it. The less the value, the more transparent the look. The reason to do this is that the selection then can be drawn by just filling a rectangle with this color.
>
>If you actually want the background to have a non-blended color, then you would have to draw the contents of every cell with the desired backcolor. This would avoid the blending fade that you are commenting on. If you want this, you can do it by setting the alpha part of the selection color to 0 (so it does not show). Then you would handle PrepareViewStyleInfo and set the backcolor you want if teh cell is selected.
>
>This thread shows how you can do this.
>
>http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=13587
RA
Rabeek
July 17, 2004 08:42 AM UTC
One more doubt on this...
Is any property to set the forecolor of the selected rows? I searched on that, but i am not able to find that. Can you help me on this...?
Thanks
AD
Administrator
Syncfusion Team
July 17, 2004 09:33 AM UTC
In PrepareViewStyleInfo, in addition to setting e.Style.BackColor on the selected cells, you can also set e.Style.TextColor (as well as any other GrridStyleInfo property that you might want to set to affect the cell appearance like e.Style.Font.Bold maybe).