![]() |
Knowing when a child item has changed |
Post Reply ![]() |
Author | |
eggbox ![]() Groupie ![]() ![]() Joined: 10 March 2006 Status: Offline Points: 12 |
![]() ![]() ![]() ![]() ![]() Posted: 10 November 2009 at 11:42am |
This is the scenario, I create an item that contains child items, I want to know when any of the child items' value has changed without having to write code in the child items OnValueChanged() to call the parent.
//*Ergin |
|
//*eggbox
Product: Xtreme ToolkitPro v18.2.0 Platform: Windows 7 (32 bit) Language: C++ / MFC |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Yes, only with OnValueChanged :(
at least CXTPPropertyGridItemSize works this way:
class CXTPPropertyGridItemSize::CXTPPropertyGridItemSizeWidth : public CXTPPropertyGridItemNumber
{ public: CXTPPropertyGridItemSizeWidth(LPCTSTR strCaption) : CXTPPropertyGridItemNumber(strCaption) { } virtual void OnValueChanged(CString strValue)
{ ((CXTPPropertyGridItemSize*)m_pParent)->SetWidth(strValue); } virtual BOOL GetReadOnly() const { return m_pParent->GetReadOnly(); } }; |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
eggbox ![]() Groupie ![]() ![]() Joined: 10 March 2006 Status: Offline Points: 12 |
![]() ![]() ![]() ![]() ![]() |
Thanks, that is what I thought, it would be cool to have a callback named something like OnChildValueChanged() though.
//*Ergin |
|
//*eggbox
Product: Xtreme ToolkitPro v18.2.0 Platform: Windows 7 (32 bit) Language: C++ / MFC |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |