Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Knowing when a child item has changed
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Knowing when a child item has changed

 Post Reply Post Reply
Author
Message
eggbox View Drop Down
Groupie
Groupie
Avatar

Joined: 10 March 2006
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote eggbox Quote  Post ReplyReply Direct Link To This Post Topic: Knowing when a child item has changed
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
eggbox View Drop Down
Groupie
Groupie
Avatar

Joined: 10 March 2006
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote eggbox Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.