Search

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

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)
0
User(s) can reproduce this bug
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 (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling version

Visual Studio 2010 SP1

Steps to reproduce

Create a window with CMFCPropertyGridCtrl and set it in alphabetic mode. Add a group item with lot of sub-items that go out of the view when expanded.

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

The scrollbar doesn't take into account the expanded sub-items and is not shown, which makes it impossible to see or modify the sub-items in the end of the group.

Expected results

The scrollbar takes the expanded sub-items into account and it is possible to scroll down to see all of them.
File Attachments
0 attachments
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.