Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Property grid, scroll position Collapse All
Subject Author Date
a a Mar 23, 2006 - 5:13 AM

Hi. Just a question about the scroll position.

Is there a way to keep the scroll position of a property grid after resynchronizing the property store?
Cause it seems each time the user resynchronizes the property store, it leads to the top of the list of properties.
If there is no ready-to-use solution, is it possible to get/set the scroll offset, so that I can save the position on reload?

Thanks.

Technical Support Mar 23, 2006 - 11:37 AM

Just get the active tree grid window in the property grid control and query its scroll position so that you can restore it later:

CExtPropertyGridCtrl * pPGC = . . .
CExtPropertyGridWnd * pGrid = pPGC->GetActiveGrid();
    if( pGrid == NULL )
        return . . .
LONG nScrollPos = pGrid->ScrollPos32Get( SB_VERT, false );
    . . .
    pGrid->ScrollPos32Set( SB_VERT, nScrollPos );