Print Page | Close Window

IP Address

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=9944
Printed Date: 07 July 2024 at 7:46pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: IP Address
Posted By: jpbro
Subject: IP Address
Date Posted: 22 March 2008 at 10:31pm
Hi,

I'm trying to implement an IP address item for the PropertyGrid. Right now, I'm using a  string item with  the SetMask property set to "000.000.000.000". This is working okay, except for the fact that the user must type the complete IP address (which is mildly annoying.) For example, instead of being able to type 127.0.01, they must type 127.000.000.001.

I was hoping that the KeyDown event would fire while editing so I could trap KeyAscii 46/110 and push the entry along with code, but alas it does not fire (as the documentation mentions). So:

1) Could we get EditKeyDown/EditKeyUp, EditSelStart/EditSelLength  AND EditText properties so we can implement this kind of functionality ourselves? AND/OR
2) Could Codejock add an IPv4 item type to the PropertyGrid, since this will likely be a fairly common entry type for a property grid. The item type should behave such that typing a decimal pushes the caret to the next octet?

Unless of course there is another way to implement this behaviour with the current build?

Thanks a lot!



Replies:
Posted By: Aaron
Date Posted: 23 March 2008 at 1:36pm
Hi,
 
I downloaded the propertygrid ownerdraw sample from the codejock site and it looks that this behaviour is solved. There are features in the propertygrid I didn't know they existed. It's just an application and not the source code, but anyway check it out yourself.
 
http://codejock.com/downloads/samples/propertygrid.asp - http://codejock.com/downloads/samples/propertygrid.asp
http://codejock.com/downloads/samples/propertygrid.asp -  
 


Posted By: jpbro
Date Posted: 23 March 2008 at 2:20pm
Thanks Aaron, the IP address item in the sample does behave as I would like...I'll mess around with the control to see if I can duplicate it, but it would be nice if that source code could be released :)



Posted By: Aaron
Date Posted: 23 March 2008 at 4:30pm
Hi,
 
Maybe the sample is build with the new release? And if it's not then we would really want the source code of that sample. Oleg ???



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