|  | 
| [solved] v17(final) - BUG Text clipped in Tooltips | 
| Post Reply   | 
| Author | |
| Marco1   Senior Member   Joined: 16 January 2004 Location: Germany Status: Offline Points: 251 |  Post Options  Thanks(0)  Quote  Reply  Topic: [solved] v17(final) - BUG Text clipped in Tooltips Posted: 13 January 2016 at 11:26am | 
| 
   Same with ribbon tooltips (tested with Office2007 and Office2010 themes). Too much space on the right side, cut off at the bottom. Have a look:  | |
|  | |
| JamesP   Groupie     Joined: 07 January 2009 Location: United Kingdom Status: Offline Points: 73 |  Post Options  Thanks(1)  Quote  Reply  Posted: 23 February 2016 at 7:39am | 
| 
   In cases where the variable m_nMaxTipWidth is set using the function SetMaxTipWidth and an image is provided, the tooltip text can be quite badly clipped. The size of the required rect is calculated in the CXTPToolTipContextToolTip::GetToolSize function. This function is giving results bigger than the m_nMaxTipWidth value. In this function there is a line of code: CRect rcText(0, 0, nMaxTipWidth - szMargin.cx, 0); I suspect it should take into account the image size, making it something like: CRect rcText(szImage.cx, 0, nMaxTipWidth - szMargin.cx, 0); In order to avoid clipping the text, the first line of code in the CXTPToolTipContextToolTip::DrawEntry function: rc.right = GetMaxTipWidth(); needs to be removed. This line was added in 17.1 and wasn't present in the v17 Beta 3 that we have previously been using. | |
|  | |
| rdhd   Senior Member     Joined: 13 August 2007 Location: United States Status: Offline Points: 951 |  Post Options  Thanks(0)  Quote  Reply  Posted: 25 February 2016 at 5:49pm | 
| 
   Are you running on a hi-res monitor? We are seeing clipping when running on one with the desktop DPI set to 200%. | |
|  | |
| JamesP   Groupie     Joined: 07 January 2009 Location: United Kingdom Status: Offline Points: 73 |  Post Options  Thanks(0)  Quote  Reply  Posted: 29 February 2016 at 6:52am | 
| 
   I am running on a high res monitor with the desktop dpi set to 200%. I  was also getting the issue when running at 100%. I think a large part of the problem could be down to the fact that we're providing extra large images to support high dpi and the tooltips always use the largest image they can find. | |
|  | |
| olebed   Senior Member   Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |  Post Options  Thanks(0)  Quote  Reply  Posted: 07 April 2016 at 10:44am | 
| 
   Hi all, I found resolution for this issue. For 125% and 150% DPI "XTP_DPI_X(nA) + XTP_DPI_X(nB)" always bigger for 1 than "XTP_DPI_X(nA + nB)". That is why difference in calculations between CXTPToolTipContextToolTip::GetToolSize and CXTPToolTipContextToolTip::DrawEntry. Also "rc.right = GetMaxTipWidth();" in CXTPToolTipContextToolTip::DrawEntry() makes incorrect tooltips drawing even on 100% and 200% DPI. Thanks James! Please check this solution. I have tested it with RibbonSample (Office2007 theme) in 100-125-200% DPI. 
 Regards, Oleksandr Lebed | |
|  | |
| scottp   Groupie   Joined: 16 October 2006 Status: Offline Points: 59 |  Post Options  Thanks(0)  Quote  Reply  Posted: 08 April 2016 at 1:10am | 
| 
   when will we see 17.2 released (or a beta) to try this and other recent bug fixes?
    | |
|  | |
| olebed   Senior Member   Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |  Post Options  Thanks(0)  Quote  Reply  Posted: 08 April 2016 at 5:38am | 
| Scott, I don't sure that this fix will be available in 17.2. This and other recent fixes need to testing. New version is preparing for release now.  | |
|  | |
| 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 |