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 Tech Support » CExtPropertyGridCtrl - How do I find out which property is selected Collapse All
Subject Author Date
Alastair Watts Mar 14, 2012 - 10:37 AM

Thanks in advance


 

Technical Support Mar 16, 2012 - 6:46 AM

First, of all, you should get the active tree grid window inside the property grid control:

CExtPropertyGridCtrl * pPGC = . . .
CExtPropertyGridWnd * pPGW = GetActiveGrid();
    if( pPGW == NULL )
        return . . .

Second, you should get the focused tree item:
HTREEITEM hti = pPGW->ItemFocusGet();
    if( hti == NULL )
        return . . .

Third, you should get property item which corresponds to the focused tree item.
CExtPropertyItem * pPI = pPGW->PropertyItemFromTreeItem( hti );
    if( pPI == NULL )
        return . . .

Fourth, the property item can be a property category. User always change property values - not categories. So, you should also check whether focused row in tree grid is property value row:
CExtPropertyValue * pValue = DYNAMIC_DOWNCAST( CExtPropertyValue, pPI );
    if( pValue == NULL )
        return . . .