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

SingleExpand

 Post Reply Post Reply
Author
Message
Osiris View Drop Down
Groupie
Groupie
Avatar

Joined: 18 June 2007
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Osiris Quote  Post ReplyReply Direct Link To This Post Topic: SingleExpand
    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

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

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
Osiris View Drop Down
Groupie
Groupie
Avatar

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

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
Osiris View Drop Down
Groupie
Groupie
Avatar

Joined: 18 June 2007
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Osiris Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.189 seconds.