Print Page | Close Window

Knowing when a child item has changed

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=15577
Printed Date: 22 November 2024 at 12:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Knowing when a child item has changed
Posted By: eggbox
Subject: Knowing when a child item has changed
Date 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



Replies:
Posted By: Oleg
Date Posted: 10 November 2009 at 1:49pm
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


Posted By: eggbox
Date Posted: 10 November 2009 at 4:08pm
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net