Print Page | Close Window

Avoiding Report Row Selection Color

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2575
Printed Date: 08 November 2025 at 1:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Avoiding Report Row Selection Color
Posted By: robosport
Subject: Avoiding Report Row Selection Color
Date Posted: 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.

 




Replies:
Posted By: Oleg
Date Posted: 14 July 2005 at 3:51pm

try

GetPaintManager()->m_clrHighlight = 0xFFFFFF



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: robosport
Date 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.

 



Posted By: robosport
Date 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.

 



Posted By: robosport
Date 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.


Posted By: Oleg
Date 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


Posted By: robosport
Date 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.




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