CXTPPropertyGridItem constraints |
Post Reply |
Author | |
andrewg
Groupie Joined: 24 September 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
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. |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
andrewg
Groupie Joined: 24 September 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
Do you mind posting an example? I'm trying to get it to work with SetCurrent() but to no avail. |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
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 |