Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Forecolor changes when selected
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forecolor changes when selected

 Post Reply Post Reply
Author
Message
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Topic: Forecolor changes when selected
    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?

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.