Print Page | Close Window

CXTPPropertyGridItem constraints

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=8138
Printed Date: 19 April 2024 at 10:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyGridItem constraints
Posted By: andrewg
Subject: CXTPPropertyGridItem constraints
Date Posted: 24 September 2007 at 12:59pm
In my CXTPPropertyGrid, I have two drop down boxes (CXTPPropertyGridItem's with constraints). The first represents the simplified code version of a string while the second is the full string. When I select a given code from the first box, I want to display the full string version in the second drop down box. Can anyone point me to how to do this?

As an example, say you have two boxes. The with language codes (EN,FR,SP) and the second with the full names (English, French, Spanish). When I select SP I want the focus to be set in the second box on Spanish automatically.





Replies:
Posted By: mgampi
Date Posted: 24 September 2007 at 1:40pm
Hi;
Try to catch the XTP_PGN_ITEMVALUE_CHANGED notification within your XTPWM_PROPERTYGRID_NOTIFY message handler in the parent of the property grid window and when the item of interrest changes, set the value and/or index of the dependent item. I did this several times in my code and it works very well.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: andrewg
Date Posted: 24 September 2007 at 4:23pm
Originally posted by mgampi mgampi wrote:

Hi;
Try to catch the XTP_PGN_ITEMVALUE_CHANGED notification within your XTPWM_PROPERTYGRID_NOTIFY message handler in the parent of the property grid window and when the item of interrest changes, set the value and/or index of the dependent item. I did this several times in my code and it works very well.


Do you mind posting an example? I'm trying to get it to work with SetCurrent() but to no avail.


Posted By: mgampi
Date Posted: 24 September 2007 at 4:34pm
Hi;
You do have to set the value and also the index. So calling SetCurrent() is insufficient since it does not reflect the change in the edit portion of the item. You have to call SetCurrent(nIndex) followed by SetValue(). You can determine the text by calling GetText(nIndex) of the CXTPPropertyGridItemConstraints* collection.
 


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



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