CMFCPropertyGridCtrl vertical scrollbar doesn't work correctly in alphabetic mode - by tribetiki

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 698304 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 11/1/2011 3:16:50 AM
Access Restriction Public
Moderator Decision Sent to Engineering Team for consideration

Description

When CMFCPropertyGridCtrl is in alphabetic mode the vertical scrollbar does not function correctly. Expanded groups which have many sub-items do not increase the scroll size as expected.


Tracing the problem with the debugger it would seem to come from this function in afxpropertygridctrl.cpp:

int CMFCPropertyGridCtrl::GetTotalItems(BOOL bIncludeHidden) const

Inside this function there is separate logic for calculating the item count depending if alphabetic mode is enabled. When alphabetic mode is enabled the following is used:

if (pProp->IsVisible())
{
    nCount++;
}

This doesn't take into account the sub-items. The logic for calculating item count when alphabetic mode is not enabled is as follows:

nCount += pProp->GetExpandedSubItems(bIncludeHidden) + 1;

I believe the latter should be used for the alphabetic mode as well instead of the simple nCount++ which ignores the sub-items.
Sign in to post a comment.
Posted by Microsoft on 11/15/2011 at 10:11 AM
Hello,

Thanks for the report. This issue has been fixed in MFC for the next major release of Visual Studio.

Pat Brenner
Visual C++ Libraries Development
Posted by MS-Moderator10 [Feedback Moderator] on 11/2/2011 at 12:53 AM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 11/1/2011 at 3:24 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)