Problem with CXTPReportRecordItemPreview |
Post Reply |
Author | |
Paddy
Groupie Joined: 28 July 2003 Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 05 January 2007 at 5:41am |
Hi,
there seems to be a problem when using CXTPReportRecordItemPreviews (V10.4.0) To reproduce: 1) enable preview with "Toggle Preview Mode". 2) After doing several clicks in some rows I always get a crash at " InternalAddRef();" in "void CXTPReportRecordItem::OnClick(XTP_REPORTRECORDITEM_CLICKARGS* pClickArgs)" Apart from that a question: m_pPreviewItem = new CXTPReportRecordItemPreview(m_HintText); m_pPreviewItem->SetBold(true); m_pPreviewItem->SetTextColor(RGB(255,0,0)); SetPreviewItem((CXTPReportRecordItemPreview*)m_pPreviewItem); SetBold and SetTextColor have no influence for the preview display. Does this makes sense? Or do I have to change the metrics for display?? Greets, Patrik |
|
Paddy
Groupie Joined: 28 July 2003 Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Hi again,
got the solution: there was no column for a preview item - so I've modified the onclick method: if (pClickArgs->pRow != NULL) pClickArgs->pRow->InternalAddRef(); if (pClickArgs->pColumn != NULL) pClickArgs->pColumn->InternalAddRef(); InternalAddRef(); pClickArgs->pControl->InternalAddRef(); .... if (pClickArgs->pRow != NULL) pClickArgs->pRow->InternalRelease(); if (pClickArgs->pColumn != NULL) pClickArgs->pColumn->InternalRelease(); InternalRelease(); pClickArgs->pControl->InternalRelease(); But I'm not sure if there could be other problems after the change! Greets, Patrik |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Yes, your code is fine. Something like this will be included into the next release.
-- WBR, Serge |
|
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 |