Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGridItem constraints
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGridItem constraints

 Post Reply Post Reply
Author
Message
andrewg View Drop Down
Groupie
Groupie


Joined: 24 September 2007
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote andrewg Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGridItem constraints
    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.


Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1010
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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 15.3.1, new Projects v 18.0.1
Platform: Windows 8.1 (64bit)
Language: VC++ 2015 U
Back to Top
andrewg View Drop Down
Groupie
Groupie


Joined: 24 September 2007
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote andrewg Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1010
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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 15.3.1, new Projects v 18.0.1
Platform: Windows 8.1 (64bit)
Language: VC++ 2015 U
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.063 seconds.