Validating URL input in wx.TextCtrl

Hello,

I am looking for quite some time now for a way to make my wx.TextCtrl widget accept only URL addresses. Is there any URL validating widget available in wxPython or does Python have any URL-validating method available? If not, can you give me some pointers on how should I go and implement such URL validation?

Thanks a bunch :slight_smile:

Hi,

路路路

On Friday, September 7, 2012 3:30:32 AM UTC-5, wxGeek wrote:

Hello,

I am looking for quite some time now for a way to make my wx.TextCtrl widget accept only URL addresses. Is there any URL validating widget available in wxPython or does Python have any URL-validating method available? If not, can you give me some pointers on how should I go and implement such URL validation?

Thanks a bunch :slight_smile:

There is no builtin widget that I鈥檓 aware of. You might be able to build something using the MaskedEditControls though (see the wxPython demo for some examples). Otherwise, take a look at these links I found:

  • Mike

try something like this

http://codepad.org/ommw8Gx3

路路路

On Friday, 7 September 2012 01:30:32 UTC-7, wxGeek wrote:

Hello,

I am looking for quite some time now for a way to make my wx.TextCtrl widget accept only URL addresses. Is there any URL validating widget available in wxPython or does Python have any URL-validating method available? If not, can you give me some pointers on how should I go and implement such URL validation?

Thanks a bunch :slight_smile: