Print Page | Close Window

Mouse Events for PropertyGrid

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=491
Printed Date: 23 November 2024 at 4:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Mouse Events for PropertyGrid
Posted By: Boyd
Subject: Mouse Events for PropertyGrid
Date Posted: 03 March 2004 at 11:33am

The PropertyGrid does not currently expose any events for MouseDown, MouseMove, or MouseUp.  Not having MouseUp makes it difficult to display Context Menus.  Can some of these be added to the next PropertyGrid release?  A HitTest property would also be nice to determine what a user clicked on.

Looking forward to the next release...




Replies:
Posted By: SuperMario
Date Posted: 03 March 2004 at 11:50am
Right now you can tell what a user clicked on by using the SelectionChanged event, you could set a tag value for each item, or use the cation of the item to determine what was clicked and how to respond to it.  Everything else would be nice additions.


Posted By: Boyd
Date Posted: 03 March 2004 at 12:00pm

I wasn't very clear on my reason for needed to know what a user clicked on.  Since the PropertyGrid doesn't provide a MouseUp event, I'm subclassing the WM_RBUTTONUP command to detect when a user right-clicks on the control.  Since all I get are the x-y coordinates of the click, I don't know which item the user clicked on.  Right-clicking an item doesn't change the selection, so using 'SelectionChanged' doesn't help in this situation.  If there was a HitTest property to determine the item corresponding to the x-y coordinates, I'd be set.  Ideally, I would like for a right-click to change the selection AND fire the popup event.  Right now, I'm stuck with just providing the popup and hoping the user changes their selection before right-clicking.




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