Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Full value tooltip is shown for empty value
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Full value tooltip is shown for empty value

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

Joined: 21 September 2007
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Silvery Quote  Post ReplyReply Direct Link To This Post Topic: Full value tooltip is shown for empty value
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Silvery View Drop Down
Groupie
Groupie
Avatar

Joined: 21 September 2007
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Silvery Quote  Post ReplyReply Direct Link To This Post 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
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.203 seconds.