Print Page | Close Window

Forecolor changes when selected

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=3963
Printed Date: 13 May 2024 at 8:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Forecolor changes when selected
Posted By: Shawshank
Subject: Forecolor changes when selected
Date Posted: 09 April 2006 at 1:37pm

I have a RC populated with several records. The first Item in each Record has it's font forecolor set to gray. If I select the Item the font forecolor changes back to the default black.

Is there a setting somewhere that controls this? I've even tried catching the SelectionChanged event and setting the color back to gray but this also fails. Is there a way to stop this behavior?




Replies:
Posted By: sserge
Date Posted: 10 April 2006 at 3:16pm
Not sure what's the problem you describe, plz show it on a picture if possible.
May be you need to set ReportControl.PaintManager.ShadeSortColumn = False ? Or any other property of the PaintManager?

--
WBR,
Serge


Posted By: Shawshank
Date Posted: 29 April 2006 at 12:16pm

As you can see from the pic I have populated the RC with several Records. I set the Forecolor of each Item(0) to grey. When I selected a Record the Item(0).Forecolor reverted back to the default of black. This is easy to duplicate. Seems like a bug, what do you think? It does not revert back to the grey color when no longer highlighted.



Posted By: nighthawk
Date Posted: 29 April 2006 at 10:04pm
How about adding the following the the ReportControl_BeforeDrawRow() event:

    If (Row.Selected = True) Then
        ReportControl.PaintManager.HighlightForeColor = Item.ForeColor
    End If


For the event to fire, you need to add the following in the record control setup:

    ReportControl.SetCustomDraw xtpCustomBeforeDrawRow




Posted By: sserge
Date Posted: 30 April 2006 at 2:22pm
Thanks nighthawk, that's correct -- highlighted (selected) rows have it's own colors which could be changed as mentioned.

--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net