Print Page | Close Window

GetItemMetrics of the CXTPReportRow is NOT virtual

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=4967
Printed Date: 22 November 2024 at 3:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: GetItemMetrics of the CXTPReportRow is NOT virtual
Posted By: Kukis
Subject: GetItemMetrics of the CXTPReportRow is NOT virtual
Date Posted: 05 September 2006 at 5:06am
I wanted to customize my control and noticed that CXTPReportRow class has not virtual GetItemMetrics method.
Original GetITemMetrics method has lines which overwrite my custom color settings.
.....

if (GetControl()->HasFocus())

{

pItemMetrics->clrForeground = pPaintManager->m_clrHighlightText;

pItemMetrics->clrBackground = pPaintManager->m_clrHighlight;

}

else if (!pPaintManager->m_bHideSelection)

{

pItemMetrics->clrForeground = pPaintManager->m_clrBtnText;

pItemMetrics->clrBackground = pPaintManager->m_clrBtnFace;

}

....
I wanted to to remove lines which set text color and made my own row class. But because GetItemMetrics is not virtual my code is never called (only at that moment I've noticed that it is not virtual)
 
Could you give my some ideas how to overcome this problem (leave text color of the selected item lets say green)? Change library code? overwrite ondrawcaption of the reportrecorditem?



Replies:
Posted By: sserge
Date Posted: 05 September 2006 at 3:05pm
Hi,

You can make CXTPReportRow::GetItemMetrics() as virtual in your toolkit sources and rebuild it. This change will be included in the next release.

--
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