Print Page | Close Window

SingleExpand

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=7939
Printed Date: 10 June 2024 at 1:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SingleExpand
Posted By: Osiris
Subject: SingleExpand
Date Posted: 05 September 2007 at 8:00am
Hi,

how can I get notified if the user expands a category in my own property grid class derived from CXTPPropertyGrid?

I want to allow only one category to be opened at a time. If a category is expanded, all other categories shall be collapsed automaticly.

Thanks in advance
Stefan




Replies:
Posted By: mgampi
Date Posted: 05 September 2007 at 9:04am
Hi,
 
take a look at the XTP_PGN_ITEMEXPANDCHANGED action of the XTPWM_PROPERTYGRID_NOTIFY message.
 


-------------
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: Osiris
Date Posted: 05 September 2007 at 10:48am
Hi Martin,

thank you for your fast response.
Is it possible to get the XTPWM_PROPERTYGRID_NOTIFY message in a derived property grid class via reflection? How would the message map entry and the message handler function signature have to look like? (I did not found any clues in the documnetation.)

Thanks (again)
Stefan


Posted By: mgampi
Date Posted: 05 September 2007 at 1:47pm
Hi Stefan,
in this case I would suggest, you derive from CXTPPropertyGridItem and replace the OnLButtonDown() handler. Then each category item should instantiate your derived item type. To ease this, first copy the source from the original CXTPPropertyGridItem::OnLButtonDown and change it as necessary - check all other category items whether they should be expanded or collapsed...
 


-------------
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: Osiris
Date Posted: 06 September 2007 at 7:34am
Hi Martin,

I've found an easier solution. Just overwrite the SendNotifyMessage method in the CXTPPropertyGrid derived class and check the wparam for XTP_PGN_ITEMEXPANDCHANGED.

Thanks for your help anyway
Stefan



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