| View previous topic :: View next topic |
| Author |
Message |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Mon Apr 28, 2003 2:57 pm Post subject: Mask Edits |
|
|
I saw a recent post regarding length of input in edit boxes. Is there a way to format the input strings? For instance 999-99-9999 for social security numbers or (999) 999-9999 for telephone numbers?
I saw that VDSOBDC.dll had a mask edit function, but I can't find a help file for that to see all the capabilities. Plus, the home page of the author is in Russian, and I don't know how I would go about registering it.
I didn't know if anyone knew any other ways .... ? |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Mon Apr 28, 2003 3:24 pm Post subject: masked edit |
|
|
No - I'm talking more about an example like a US phone number.
For instance, in my application, I have an edit box for entering the customer phone number. Currently, there is no limit on the number of characters the user can enter, and there is no set format for entry.
It makes the application more user-friendly if they can just use the number keys and the overall format is already set to:
(___) ___-____
The same principle would apply to date entry, social security numbers, etc.
__ /__ /__ for date
___-__-____ for social security number.
Any help is appreciated - thanks |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Mon Apr 28, 2003 3:30 pm Post subject: |
|
|
So the user just types in 5555555555, but it appears in the edit box as (555)555-5555? _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Mon Apr 28, 2003 3:44 pm Post subject: |
|
|
This is the easiest way to do it...
| Code: | DIALOG CREATE,New Dialog,-1,0,144,56
DIALOG ADD,EDIT,EDIT1,26,14,24,19,
DIALOG ADD,EDIT,EDIT2,26,48,24,19,
DIALOG ADD,EDIT,EDIT3,26,82,52,19,
DIALOG ADD,TEXT,TEXT1,28,8,,,(
DIALOG ADD,TEXT,TEXT2,28,40,,,)
DIALOG ADD,TEXT,TEXT3,28,75,,,-
DIALOG ADD,TEXT,TEXT4,8,8,,,Phone number:
DIALOG SHOW
%x = @sendmsg(~EDIT1,$00C5,3,0)
%x = @sendmsg(~EDIT2,$00C5,3,0)
%x = @sendmsg(~EDIT3,$00C5,4,0)
:Evloop
wait event
goto @event()
:Close
exit |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Mon Apr 28, 2003 3:54 pm Post subject: |
|
|
There was a DLL available at one time that allowed you to do what you are asking! I can't remeber what it is called but i remeber getting if from
www.sools.com - Tommys homepage
It allowed the following plus more....
192.189.0.123
___.___.___.___
for IP address masking plus more....
Nathan
I will see if i still have it and post a link  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Mon Apr 28, 2003 6:18 pm Post subject: |
|
|
Thanks for the replies!
Yes, it is VDSODBC that has that function in it. But like I was saying, I can't find a help file for that when I download it, and the site is in Russian.
Thanks for the code example. I'll work through it and see if it is applicable for what I need. I was hoping I would find a simple function in another .dll that would provide a masked edit.
Again, thanks for the responses - |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Apr 28, 2003 7:58 pm Post subject: |
|
|
There's also this unsuccessful example which was an attempt to
automatically advance the cursor to the next edit. But it didn't work.
| Code: | Title Input Test
DIALOG CREATE,Input Test,-1,0,240,97
DIALOG ADD,TEXT,TPrompt,13,13,,,Please enter your serial number:
DIALOG ADD,EDIT,Number1,28,14,46,19
DIALOG ADD,EDIT,Number2,28,68,46,19
DIALOG ADD,EDIT,Number3,28,122,46,19
DIALOG ADD,EDIT,Number4,28,176,46,19
DIALOG ADD,TEXT,D1,32,61,,,-
DIALOG ADD,TEXT,D2,32,116,6,13,-
DIALOG ADD,TEXT,D3,32,170,4,13,-
DIALOG ADD,BUTTON,OK,60,78,64,24,OK
DIALOG SHOW
DIALOG DISABLE,OK
%%inlen = 6
%x = @sendmsg(~Number1,$00C5,%%inlen,0)
%x = @sendmsg(~Number2,$00C5,%%inlen,0)
%x = @sendmsg(~Number3,$00C5,%%inlen,0)
%x = @sendmsg(~Number4,$00C5,%%inlen,0)
:Evloop
wait event,
goto @event()
:Timer
%%String = @dlgtext(Number1)@dlgtext(Number2)@dlgtext(Number3)@dlgtext(Number4)
if @equal(@len(%%string),@fmul(%%inlen,4))
DIALOG ENABLE,OK
else
DIALOG DISABLE,OK
end
if @equal(@focus(),Number1)
if @equal(@len(@dlgtext(Number1)),%%inlen)
DIALOG FOCUS,Number2
end
elsif @equal(@focus(),Number2)
if @equal(@len(@dlgtext(Number2)),%%inlen)
DIALOG FOCUS,Number3
end
elsif @equal(@focus(),Number2)
if @equal(@len(@dlgtext(Number2)),%%inlen)
DIALOG FOCUS,Number3
end
elsif @equal(@focus(),Number3)
if @equal(@len(@dlgtext(Number3)),%%inlen)
DIALOG FOCUS,Number4
end
elsif @equal(@focus(),Number4)
if @equal(@len(@dlgtext(Number4)),%%inlen)
DIALOG FOCUS,OK
end
end
goto evloop
:OKBUTTON
:Close
warn You entered the following string:@cr()%%String
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Tue Apr 29, 2003 1:05 am Post subject: |
|
|
I've updated the VDSOBJ02.DLL 2.4.28.2003, it now has a fully functional maskedit control. It allows user definable masks and comes with an example for social security, phone number, zip, date, time. The help file explains each special mask character you can use so you can easily create your own custom masks. You can get the updated VDSOBJ at:
DOWNLOAD HERE |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Tue Apr 29, 2003 1:26 am Post subject: Mask Edit |
|
|
Sweet!
This looks like just what I need! I've downloaded the file and will check it out tomorrow more thoroughly. It looks like exactly what I was looking for.
If so, I'll be purchasing it. Thanks - |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Tue Apr 29, 2003 3:31 am Post subject: |
|
|
| Try the vds 4 example 3 script. It is a complete example of using multiple maskedit's. |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Apr 29, 2003 6:53 pm Post subject: |
|
|
Nice job, Prakash.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Apr 29, 2003 6:59 pm Post subject: |
|
|
Well I would think we should use them if they're there.
Yes I do like them.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|