Tooltip not consistent with multi-line Report Row. |
Post Reply |
Author | |
lviolette
Groupie Joined: 17 March 2007 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
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 |
|
lviolette
Groupie Joined: 17 March 2007 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
|
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 |
|
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 |