Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Tooltip not consistent with multi-line Report Row.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tooltip not consistent with multi-line Report Row.

 Post Reply Post Reply
Author
Message
lviolette View Drop Down
Groupie
Groupie
Avatar

Joined: 17 March 2007
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote lviolette Quote  Post ReplyReply Direct Link To This Post Topic: Tooltip not consistent with multi-line Report Row.
    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
Back to Top
lviolette View Drop Down
Groupie
Groupie
Avatar

Joined: 17 March 2007
Location: United States
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote lviolette Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.