Print Page | Close Window

Full value tooltip is shown for empty value

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=17654
Printed Date: 12 December 2024 at 10:00am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Full value tooltip is shown for empty value
Posted By: Silvery
Subject: Full value tooltip is shown for empty value
Date Posted: 08 December 2010 at 11:34pm
Hello,

In some cases, a tooltip for an empty value is show: 

To reproduce the problem change in the PropertyGrid sample application do the following steps:
    1. In PrepertyGridDlg.cpp remove/comment xtpGridItemHasEdit flag for "2 Buttons" grid item like this:
pItem = pButtons->AddChildItem(new CXTPPropertyGridItem(_T("2 Buttons")));
pItem->SetID(510);
pItem->SetFlags( /*xtpGridItemHasEdit |*/ xtpGridItemHasComboButton | xtpGridItemHasExpandButton);
    2. Run the application, resize the window to the minimum width and height (a scroller is needed to reproduce the problem)
    3. Expand "Standard Buttons" category and move the divider so that only 2-3 pixels pixels left between the divider and the "..." button, like this: 
    4. Move mouse over selected part of the line (label) and slowly move it to the right, the tooltip doesn't appear if mouse is moved from the button to the left. At some point, where a mouse cursor still has shape of a movable divider and button is not highlighted yet the empty tooltip will appear.

The problem was encountered with a custom in-place button that occupies all value area - the code is very similar to CCItemButtonControl from the PropertyGrid sample but uses CXTPPropertyGridInplaceButton as a button.

Fix seems to be trivial - add a check for empty string in m_strTipText in CXTPPropertyGridView::ShowToolTip before calling _ShowToolTip.

I would like to get a confirmation/denial for the problem and the fix. And in case of confirmation, I also would like to see the fix in the future versions of the ToolkitPro.

Thank you.





-------------
Product: Xtreme Toolkit Pro version 13.4.2

Platform: Windows Vista (32bit) - SP 2

Language: Visual C++ 10.0



Replies:
Posted By: Oleg
Date Posted: 16 December 2010 at 2:53am
Hello,

Thanks, we made following fix (please make same and rebuild toolkit)

...
void CXTPPropertyGridView::_ShowToolTip(CRect rcBound, CRect rcText, CXTPPropertyGridItem* pItem, BOOL bValuePart)
{
if (!m_wndTip.GetSafeHwnd() || m_strTipText.IsEmpty())
return;



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Silvery
Date Posted: 16 December 2010 at 6:43pm
Thank you.

-------------
Product: Xtreme Toolkit Pro version 13.4.2

Platform: Windows Vista (32bit) - SP 2

Language: Visual C++ 10.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