Finding the PropertyGrid Delete Key Event in VB.NET
-
Hi CP , I am using the Property grid in my application .Lets consider [None] has to appear if i set the property to empty. Consider VB6.0 application to understand clearly . Lets consider the Image property of Picture box. I set the image from My Documents. THen at the Image property i pressed the DEL key from keyboard .Directly it has to show the [None] as property text bcoz there is no image for the Picture box. How to achieve this Functionality in Propertygrid ?? Regards,
-
Hi CP , I am using the Property grid in my application .Lets consider [None] has to appear if i set the property to empty. Consider VB6.0 application to understand clearly . Lets consider the Image property of Picture box. I set the image from My Documents. THen at the Image property i pressed the DEL key from keyboard .Directly it has to show the [None] as property text bcoz there is no image for the Picture box. How to achieve this Functionality in Propertygrid ?? Regards,
If I understand what you want correctly, you don't handle the Key events of the propertygrid, but create a custom UITypeEditor for your property and handle the keypress in that.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
If I understand what you want correctly, you don't handle the Key events of the propertygrid, but create a custom UITypeEditor for your property and handle the keypress in that.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Hi Dave, Thanks for reply. May i know how can i implement in custom UITypeEditor ??? Regards
Google for "UITypeEditor VB.NET" and you'll find examples. There's just too much information to stick in a forum post.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008