custom password dialogue
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Tue Dec 6 12:37:19 EST 2005
Hi Bill,
Would be a very elegant and "short coding" solution if I had not the
time to read the letters that are typed (Mac OS)
Then you have to use a rawKeyDown handler (or KeyDown + deleteKey)
and it becomes another story...
But the idea is very good: completely cross-platform :-)
Best Regards from Paris,
Eric Chatonet.
Le 6 déc. 05 à 18:13, Bill Marriott a écrit :
> You'll need to make your own window, as the dialog presented by "ask
> password" is not customizable beyond the prompt text. But, there is no
> built-in "Password" style for fields.
>
> Here is what I thought was a very simple solution to that:
>
> 1) Include a tiny image (such as a 10x10 pixel padlock) in your
> stack. I
> named mine "tinyPadlock."
>
> 2) Attach this script to the field used for password entry:
>
> on keyUp
> -- enable masking of password during entry
> lock messages
> lock screen
> repeat with i = 1 to the number of characters in me
> if the imagesource of char i of me is not "tinyPadlock" then
> set the imagesource char i of me to "tinyPadlock"
> end if
> end repeat
> unlock messages
> pass keyUp
> end keyUp
>
> This handles whatever someone might do in the field, masks their
> input, and
> still allows you to access the content of the field as if the password
> masking was not used.
>
> I put a small sample file up on Rev Online so you can see how it
> works.
>
> User: MerryOtter
> Stack: Easy Passwords
----------------------------------------------------------------
So Smart Software
For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
Free plugins and tutorials on my website
----------------------------------------------------------------
Web site http://www.sosmartsoftware.com/
Email eric.chatonet at sosmartsoftware.com/
Phone 33 (0)1 43 31 77 62
Mobile 33 (0)6 20 74 50 86
----------------------------------------------------------------
More information about the use-livecode
mailing list