SingleExpand |
Post Reply |
Author | |
Osiris
Groupie Joined: 18 June 2007 Status: Offline Points: 29 |
Post Options
Thanks(0)
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 |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
Hi,
take a look at the XTP_PGN_ITEMEXPANDCHANGED action of the XTPWM_PROPERTYGRID_NOTIFY message.
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
Osiris
Groupie Joined: 18 June 2007 Status: Offline Points: 29 |
Post Options
Thanks(0)
|
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 |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
Osiris
Groupie Joined: 18 June 2007 Status: Offline Points: 29 |
Post Options
Thanks(0)
|
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 |
|
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 |