Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 698304
Opened: 11/1/2011 3:16:50 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
0
User(s) can reproduce this bug

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.
Details
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)
Sign in to post a workaround.