|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Limit ComboBox entry to ipaddress formatI would like to allow a user to enter an ip address (quad octet format:
www.xxx.yyy.zzz) in a combo box and then add it to the list when they have completed the entry. How can I do this? The textupdate and textchanged events fire for each keystroke so I don't think that is the solution. I was hoping there was an event which would fire when they completed text entry and hit enter or the hit the down arrow but no such luck. I can watch the lost focus event and check then but I think there is a better solution. Thanks for your help. You can always check the length of the text in the combobox. when it is
15 (including the dots) then you do your validation. Or you can handle keyup event and check if the pressed key is enter then do your validation. Let me know if that solves your issue. Cheers, Ahmed nt8jbw***@sneakemail.com wrote: Show quoteHide quote > I would like to allow a user to enter an ip address (quad octet format: > www.xxx.yyy.zzz) in a combo box and then add it to the list when they > have completed the entry. > > How can I do this? > > The textupdate and textchanged events fire for each keystroke so I > don't think that is the solution. I was hoping there was an event > which would fire when they completed text entry and hit enter or the > hit the down arrow but no such luck. I can watch the lost focus event > and check then but I think there is a better solution. > > Thanks for your help. Ahmed wrote:
> You can always check the length of the text in the combobox. when it is Thanks for you reply.> 15 (including the dots) then you do your validation. Or you can handle > keyup event and check if the pressed key is enter then do your > validation. > I think that is a good start. However, what about 10.0.0.1, 10.0.0.10, and 10.0.0.100? Thanks. Are you using .NET 2.0 or 1.1? if you are using 2.0, you can use the
masked Textbox. If you want a drop down what you can do is to have the masked textbox. Take a look at this site: http://msdn2.microsoft.com/en-us/library/ka7h9fze.aspx or you can validate the ip address when the user press on enter. nt8jbw***@sneakemail.com wrote: Show quoteHide quote > Ahmed wrote: > > You can always check the length of the text in the combobox. when it is > > 15 (including the dots) then you do your validation. Or you can handle > > keyup event and check if the pressed key is enter then do your > > validation. > > > > Thanks for you reply. > > I think that is a good start. However, what about 10.0.0.1, 10.0.0.10, > and 10.0.0.100? > > Thanks.
Write to an XML file using data from an SQLserver table
Master Page Template difference between imports-implements-inherits DataBinding with Unbound Columns and calling EndCurrentEdit ListBox Problem firing a dts package's execution How To Show Partial Classes as a Hierarchy in Solution Explorer? XML WebSvc Proxy Code Syntax Questions Passing a parameter Collection Burn CD in vb 2005 |
|||||||||||||||||||||||