Page 2 of 5

Posted: Fri Feb 09, 2007 10:33 pm
by Xombie
I don't like to steal other people's posts but...

@Fangles - grab my code at the end of ...

http://www.purebasic.fr/english/viewtop ... c&start=15

... this post.

In the example, change ...

Code: Select all

SetGadgetMask(0, "999-99-9999", "123456789", '*', #False)
... to ...

Code: Select all

SetGadgetMask(0, "$999999.99", "", '#', #False)
It can work for this purpose but fails if you want a variable amount of numbers before the decimal. However, I know how much you hate large pieces of code so I doubt you'll use it :)

I'll see if I can make an adjustment for currency values.

Posted: Fri Feb 09, 2007 10:43 pm
by netmaestro
I don't like to steal other people's posts but
Come on in Xombie, the water's fine! More the merrier :D

Posted: Sat Feb 10, 2007 2:24 am
by Fangbeast
Xombie wrote:I don't like to steal other people's posts but...

@Fangles - grab my code at the end of ...

http://www.purebasic.fr/english/viewtop ... c&start=15

... this post.

In the example, change ...

Code: Select all

SetGadgetMask(0, "999-99-9999", "123456789", '*', #False)
... to ...

Code: Select all

SetGadgetMask(0, "$999999.99", "", '#', #False)
It can work for this purpose but fails if you want a variable amount of numbers before the decimal. However, I know how much you hate large pieces of code so I doubt you'll use it :)

I'll see if I can make an adjustment for currency values.
You are right, I doubt I'll use it as it was a silly comment on your part. :D :D :D 3 smileys for you :D :D :D :evil:

Posted: Sat Feb 10, 2007 2:27 am
by Fangbeast
TerryHough wrote:
Fangbeast wrote:I want a properly formatted, masked string gadget
such as I used to use in early versions of visual basic. I used it back in
the early days of vb.
This isn't a gadget, but here is code I posted in May 2004 about
something similar (updated for PB 4.00). Sparkie was involved in that
topic too :D

Maybe you will find a useable idea here, before all the brain matter leaks
out the eye sockets.
[/code]
Terry you old bugger, still hiding around the forums I see!! Arr, good to see your stuff. Your date picker code got me started years ago and it's still damned useful.

Posted: Tue Feb 13, 2007 5:38 am
by Rook Zimbabwe
Terry I have to cut all the sound out... I seem not to have those noises... Looks like good work otherwise!

Posted: Tue Feb 13, 2007 6:25 am
by Fangbeast
Xombie wrote:I don't like to steal other people's posts but...

@Fangles - grab my code at the end of ...

http://www.purebasic.fr/english/viewtop ... c&start=15

... this post.

In the example, change ...

Code: Select all

SetGadgetMask(0, "999-99-9999", "123456789", '*', #False)
... to ...

Code: Select all

SetGadgetMask(0, "$999999.99", "", '#', #False)
It can work for this purpose but fails if you want a variable amount of numbers before the decimal. However, I know how much you hate large pieces of code so I doubt you'll use it :)

I'll see if I can make an adjustment for currency values.
If you are still reading this post, try to adjust a few things first please, unless the code is generic to masks and not specific to currency (I think I made a silly comment myself there (grin))

1. Don't allow the cursor to go before the "$" symbol.
2. Make the field mask len char "#" invisible, it doesn't need to be seen I think. Not sure how excel does it as I haven't got it.
3. Check if the user pressed the "." and jump after the decimal point.

Should you choose not to accept this mission mr spock, the message will self destruct in 10 seconds.

Good work by the way.

Posted: Tue Feb 13, 2007 2:51 pm
by rsts
Fangbeast wrote:
Should you choose not to accept this mission mr spock, the message will self destruct in 10 seconds.

Good work by the way.
Mr Phelps, I believe - only us old codgers remember that :)

Posted: Tue Feb 13, 2007 3:09 pm
by Fangbeast
rsts wrote:
Fangbeast wrote:
Should you choose not to accept this mission mr spock, the message will self destruct in 10 seconds.

Good work by the way.
Mr Phelps, I believe - only us old codgers remember that :)
I know it was phelps but spock sounded more modern. And xombie's ears need prunind:):)

Posted: Tue Feb 13, 2007 3:32 pm
by netmaestro
I'm pretty sure it was five seconds.

Posted: Wed Feb 14, 2007 1:04 am
by Fangbeast
netmaestro wrote:I'm pretty sure it was five seconds.
I added the extra 5 because rsts said "us old codgers remember that" and us old codgers are slow and need the extra 5 seconds

Posted: Thu Feb 15, 2007 8:13 am
by netmaestro
[moved to first post]

Posted: Thu Feb 15, 2007 8:26 am
by Fangbeast
You guys crack me up. But I'm still sending a bunch of feral, lobotimsed hamsters with laser gun scopes to take you out for those cracks!!

And listen here Netmaestro, you haven't passed the old geezer test yet so I'm not sure you are allowed to use my copyright name of "Fanglized", certified by the old geezers association.

Now Sparkie I can vouch for, he passed with flying colours (Evil Grin(c) 2007))

Posted: Thu Feb 15, 2007 8:30 am
by netmaestro
I bet I'm older than you..

( I started coding with punchcards :wink: )

Posted: Thu Feb 15, 2007 8:55 am
by Fangbeast
netmaestro wrote:I bet I'm older than you..

( I started coding with punchcards :wink: )
I was born at/before punchcards (I think). Doesn't change the fact that you have to pass the geezer test, send me some martian dollars, assorted loose women (And they have to be loose because the tight ones kill me) and 3 witnesses must sign.

Relatives, friends and pad off third parties may not sign!!!

Posted: Thu Feb 15, 2007 11:31 am
by stubbsi
Ah -- I remember punch cards

Ah -- I remember tripping

Ah -- I remember :(