Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - SetBold-Property in CXTPReportRecordItemPreview
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SetBold-Property in CXTPReportRecordItemPreview

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


Joined: 14 September 2007
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michl Quote  Post ReplyReply Direct Link To This Post Topic: SetBold-Property in CXTPReportRecordItemPreview
    Posted: 29 July 2010 at 7:36am
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
Back to Top
Michl View Drop Down
Senior Member
Senior Member


Joined: 14 September 2007
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michl Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2010 at 2:53am
Is this an issue for the next release?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.902 seconds.