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 » CExtPropertyGridCtrl Collapse All
Subject Author Date
ven rag Oct 9, 2006 - 9:28 AM

Hi ppl..

I have Created a CExtPropertyGridCtrl ..Whenever I Click a Button I create a "New" Store and Add it to the CExtPropertyGridCtrl ..
What I have to Do is When I click the Button the Old Store as to be Removed and Add the New Store in it..I am not able to Remove the Old Store...

How to Clear the Property Grid and Add the New Store in it....

Also I have three Separate Store in the Combo Box of CExtPropertyGridCtrl. How to Combine the Three Store in such a way that
When I click "All" in the Combo BoX ,the three Store as to Displayed....

Thank you...

Technical Support Oct 17, 2007 - 12:13 PM

You can do this with CExtPropertyGridCtrl::GetChildByRTC() like as follows

CExtPropertyGridComboBoxBar * pCombo =
        STATIC_DOWNCAST(
            CExtPropertyGridComboBoxBar,
            m_PGC.GetChildByRTC(
                RUNTIME_CLASS(CExtPropertyGridComboBoxBar)
                )
            );
    if( pCombo == NULL )
        return;
    ASSERT_VALID( pCombo );


Ivan Surzhenko Oct 17, 2007 - 10:27 AM

How I can get access to CExtPropertyGridComboBoxBar at CExtPropertyGridCtrl?

Technical Support Oct 9, 2006 - 12:13 PM

The CExtPropertyGridComboBoxBar::PropertyStoreInsert() method inserts a CExtPropertyStore object into the combo box bar inside the property grid control. The CExtPropertyGridComboBoxBar::PropertyStoreRemove() method removes a property store from the combo box bar. Please note, the C++ delete operator is never used in the property grid control for deleting CExtPropertyStore objects. This means it is your code that is responsible for deleting property stores.

If you need the combined properties view, then you should create a new CExtPropertyStore object and combine it with two basic property stores. This new combined property store would contain references to propery categories and values stored in two source property stores. You can insert the combined propery store into the property grid control absolutely just like you can do this just like a simple basic property store.

To combine the property store with others, please use its Combine() method.