I have a custom object that I use in a PropertyGrid as seen below. It
presents an elipsis button that when clicked brings up a custom modal
dialog. When I make a change in the property, the PropertyValueCh anged event
never gets fired. I have other properties in the PropertyGrid that do fire
the event. Is there anything special that I need to do to have the event
fired?
[System::Compone ntModel::Editor Attribute(__typ eof(CPictureEdi tor),
__typeof(System ::Drawing::Desi gn::UITypeEdito r))]
[System::Compone ntModel::TypeCo nverterAttribut e(__typeof(CPic tureConverter))
]
[Serializable]
public __gc class PictureObj : public
System::Runtime ::Serialization ::ISerializable
{
private:
CPicture* m_pPicture;
public:
PictureObj()
{
m_pPicture = new CPicture;
}
~PictureObj()
{
delete m_pPicture;
}
PictureObj(Syst em::Runtime::Se rialization::Se rializationInfo *si,
System::Runtime ::Serialization ::StreamingCont ext sc)
{
m_pPicture = new CPicture;
SetObjectData(s i, sc);
}
void SetPicture(CPic ture* pic) { *m_pPicture = *pic; }
CPicture* GetPicture() { return m_pPicture; }
void GetObjectData(S ystem::Runtime: :Serialization: :SerializationI nfo
*si,
System::Runtime ::Serialization ::StreamingCont ext sc);
void SetObjectData(S ystem::Runtime: :Serialization: :SerializationI nfo
*si,
System::Runtime ::Serialization ::StreamingCont ext sc);
__property IPicture* get_Picture() { return m_pPicture->m_pImage; }
__property void set_Picture(IPi cture* value) { m_pPicture->m_pImage =
value; }
__property System::String* get_ImageExt() { return new
System::String( m_pPicture->m_strImageExt) ; }
__property void set_ImageExt(Sy stem::String* value) {
m_pPicture->m_strImageEx t = value; }
};
presents an elipsis button that when clicked brings up a custom modal
dialog. When I make a change in the property, the PropertyValueCh anged event
never gets fired. I have other properties in the PropertyGrid that do fire
the event. Is there anything special that I need to do to have the event
fired?
[System::Compone ntModel::Editor Attribute(__typ eof(CPictureEdi tor),
__typeof(System ::Drawing::Desi gn::UITypeEdito r))]
[System::Compone ntModel::TypeCo nverterAttribut e(__typeof(CPic tureConverter))
]
[Serializable]
public __gc class PictureObj : public
System::Runtime ::Serialization ::ISerializable
{
private:
CPicture* m_pPicture;
public:
PictureObj()
{
m_pPicture = new CPicture;
}
~PictureObj()
{
delete m_pPicture;
}
PictureObj(Syst em::Runtime::Se rialization::Se rializationInfo *si,
System::Runtime ::Serialization ::StreamingCont ext sc)
{
m_pPicture = new CPicture;
SetObjectData(s i, sc);
}
void SetPicture(CPic ture* pic) { *m_pPicture = *pic; }
CPicture* GetPicture() { return m_pPicture; }
void GetObjectData(S ystem::Runtime: :Serialization: :SerializationI nfo
*si,
System::Runtime ::Serialization ::StreamingCont ext sc);
void SetObjectData(S ystem::Runtime: :Serialization: :SerializationI nfo
*si,
System::Runtime ::Serialization ::StreamingCont ext sc);
__property IPicture* get_Picture() { return m_pPicture->m_pImage; }
__property void set_Picture(IPi cture* value) { m_pPicture->m_pImage =
value; }
__property System::String* get_ImageExt() { return new
System::String( m_pPicture->m_strImageExt) ; }
__property void set_ImageExt(Sy stem::String* value) {
m_pPicture->m_strImageEx t = value; }
};
Comment