![]() |
Avoiding Report Row Selection Color |
Post Reply
|
| Author | |
robosport
Groupie
Joined: 20 June 2005 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
Quote Reply
Topic: Avoiding Report Row Selection ColorPosted: 14 July 2005 at 2:28pm |
|
Is there a way to block the report control from changing a selected row's background color when a user clicks on the row? Basically I want the report control to look as if no row can be selected. Thank you.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 July 2005 at 3:51pm |
|
try GetPaintManager()->m_clrHighlight = 0xFFFFFF |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
robosport
Groupie
Joined: 20 June 2005 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 July 2005 at 4:04pm |
|
That is close to what I need. Unfortunately the group record items are one color and the child record items are using a ledger (alternating) color scheme. You solution changes the color for each record item to the same color. Is there a way to get the record item background color prior to drawing the highlight? I tried for the OnReportItemLClick for the Report Control but it gets called after the highlight is drawn. Thank you.
|
|
![]() |
|
robosport
Groupie
Joined: 20 June 2005 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 July 2005 at 4:29pm |
|
I made a custom CXTPReportRecordItemText derived class that stores the background color. And I implemented an overridden Draw function that simply calls the control's GetPaintManager and sets the appropriate background color before calling the original CXTPReportRecordItemText::Draw function. That correctly kept the background color from changing. Unfortunately the selected items text color changes to white and now that the background color is correct I can see a focus box being drawn around the item. Both of which I need to eliminate in order to make it look like the row is not being selected. Any other ideas? Thanks again.
Edited by robosport |
|
![]() |
|
robosport
Groupie
Joined: 20 June 2005 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 July 2005 at 4:44pm |
|
I fixed the highlight text color using the same type of solution and setting m_clrHighlightText, but I have not found a way to eliminate the focus outline box.
Edited by robosport |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 July 2005 at 12:29am |
|
You can override virtual void CXTPReportPaintManager::DrawFocusedRow(CDC* pDC, CRect rcRow); and do nothing in it. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
robosport
Groupie
Joined: 20 June 2005 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 July 2005 at 10:31am |
|
Perfect! Thank you! Now that I've been digging around in this code for a couple weeks I'm starting to see the big picture on how it all works. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |