Hi codejock developers!
If I use (set) this property, nothing happens. Any text in preview is still displayed in regluar style.
I saw, this property is derived from CXTPReportRecordItem. This class take notice the flag (see code)
void CXTPReportRecordItem::GetItemMetrics(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pItemMetrics) { if (m_clrBackground != XTP_REPORT_COLOR_DEFAULT) pItemMetrics->clrBackground = m_clrBackground;
if (m_clrText != XTP_REPORT_COLOR_DEFAULT) pItemMetrics->clrForeground = m_clrText;
if (m_pFontCaption != NULL) pItemMetrics->pFont = m_pFontCaption; else if (m_bBoldText) pItemMetrics->pFont = &pDrawArgs->pControl->GetPaintManager()->m_fontBoldText;
if (m_Alignment != (XTPReportColumnIconAlignment)(-1)) pItemMetrics->nColumnAlignment = m_Alignment; }
|
But class CXTPReportRecordItemPreview only take a default font.
void CXTPReportRecordItemPreview::GetItemMetrics(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pItemMetrics) { pItemMetrics->clrForeground = pDrawArgs->pControl->GetPaintManager()->m_clrPreviewText; pItemMetrics->pFont = &pDrawArgs->pControl->GetPaintManager()->m_fontPreview; }
|
Should this method not implemented as following (or similar)?
void
CXTPReportRecordItemPreview::GetItemMetrics(XTP_REPORTRECORDITEM_DRAWARGS*
pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pItemMetrics)
{ __super::GetItemMetrics( pDrawArgs, pItemMetrics );
pItemMetrics->clrForeground = pDrawArgs->pControl->GetPaintManager()->m_clrPreviewText; if (!m_bBoldText) pItemMetrics->pFont = &pDrawArgs->pControl->GetPaintManager()->m_fontPreview; }
|
I'm interesting for your response!
Michael
|