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 » Query related to property grid Collapse All
Subject Author Date
Nitesh Singh Aug 30, 2006 - 3:47 AM

Sir,
I am implementing property grid in my application. And that I have supported for some properties of some types of objects. my approach is

class CMyObject1PropValueBase : public CExtPropertyValue
{
public:
CExtPropertyGridCtrl m_PGC;
CMyObject1 *m_pObject;
DECLARE_DYNAMIC( CMyObject1PropValueBase );
CMyObject1PropValueBase( LPCTSTR strPropertyName = NULL, CMyObject1 * pObject = NULL);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump( CDumpContext & dc ) const;
#endif
};


class CMyObject1Prop_Color : public CMyObject1ValueBase
{
public:
DECLARE_DYNAMIC( CMyObject1_Color );
CMyObject1_Color( CMyObject1* pObject = NULL);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump( CDumpContext & dc ) const;
#endif
virtual void Apply( CExtGridCell * pValue = NULL);
};

now in the MyObject1::GetPropertyStore() I will populate the property store with the class mentions above. This is a simple property..

Now in some of my object classes I am having many nodes ( which stores more information and number of nodes can vary) now I am thinking that If I select this object then the corresponding propertygrid should not show all the nodes and their properties at once.. I should show by Node Index... like

on the propertyGrid...
there is an Item............ with Node Index. ...
and .. ... then 4-5 items related to that node....
and then.. other property items which are with object...

and that NodeIndex item should have some feature... so that I can swich to the 2nd node.. and 3rd node..(may be something like horizontal or verical spin control...) and if node index is changed then the property related to currect selected node should get displayed...

Sir, did you understand my problem? Please suggest me what could be the most effecient way of supporting this with your property grid.. Thank you very much. I am waiting for the reply. I mailed the same thing yesterday but I have not got any reply...

Nitesh Singh Aug 31, 2006 - 11:06 PM

Sir I have replied you through the mail.. please go through the screenshots. I have asked one more question? and the question is...

that I want to support "a box filled with some color and a string" in my ComboBox for propertygrid or "a line of which width can vary and a string" in my ComboBox for propertygrid. How to do that.

thank you..

Technical Support Aug 31, 2006 - 9:08 AM

We are not sure if we understood you correctly but if you want to split some properties into sub-properties, you should use compound property values as it is demonstrated in the CompoundProperties sample. Please note you don’t have to code a separate C++ class for each propery. There are two different approaches to using the property grid control and they are demostrared in the CompoundProperties and PropertyGrid samples. The first demonstrates a simplier way for managing property grid’s properties without a large number of C++ classes and the latter uses a separate C++ class for each property value. Would you send us some screenshots that clarify what you are asking about?