Print Page | Close Window

Tooltip not consistent with multi-line Report Row.

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=18435
Printed Date: 29 September 2024 at 3:25am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tooltip not consistent with multi-line Report Row.
Posted By: lviolette
Subject: Tooltip not consistent with multi-line Report Row.
Date Posted: 24 May 2011 at 7:22pm
I have a CXTPReportControl with Multi-line enabled.
m_rptMessages.GetPaintManager()->SetFixedRowHeight(FALSE);
 
When I add a row that has text with carriage returns in it, it displays correctly in the Report Control.
 
If I hover over it with my mouse, however, it shows a tooltip window that has all the text on one long line.
 
CXTPReportControl::OnMouseMove calls pRow->ShowToolTip(point, &m_wndTip);
CXTPReportRow::ShowTooltip calls pTipWnd->Activate(TRUE, IsPreviewItem || IsIconView);
 
My report has not enabled previews nor is it in Icon mode.  It's just doing multi-line text, so it results in passing false for the second parameter to Activate which appears to control whether tooltips are multiline.
 
Is there a way around this?  This appears to be a bug to me.


-------------
L. Violette
Monolith
www.lith.com
Xtreme Toolkit Pro v22.1.0



Replies:
Posted By: lviolette
Date Posted: 24 May 2011 at 8:23pm
To followup, you can repro this behavior in ReportSample by modifying ReportSampleView.cpp with the following changes:
 
In AddSampleRecords, modify one of the subjects to have a \r\n in it:
    strSubject = _T("Comment Added: memory leak in OnEndEdit()?\r\nThis is very bad!");
 
In OnReportcontrolMultilinesample():
Comment out all the code that sets DT_WORDBREAK.
Comment out setting m_bUseColumnTextAlignment = TRUE;
 
Run App.  make window small enough so that Subject gets truncated with "...".
Hover over it, see there's a tooltip.
Select "Report Control | Multiline Sample".
 
You should see your subject now go to two lines.
Hover over it now.
 
2 problems:
* Even though it's no longer truncated, there's still a tooltip.
* The tooltip does not respect the \r\n, it's all on one line.
 
 
 

 


-------------
L. Violette
Monolith
www.lith.com
Xtreme Toolkit Pro v22.1.0



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