simple modal questions

Yves COPPE yvescoppe at skynet.be
Tue Jan 13 02:32:58 EST 2004


Le 13 janv. 04, à 07:50, Dar Scott a écrit :

>
> On Monday, January 12, 2004, at 07:58 PM, Doug Lerner wrote:
>
>> (2) How do you make a text field into a "password" field (asterisked 
>> out)?
>
>


here is a sample :

suppose you have a fld named "pass"

here is the script of the fld :

local thisPassword
on returninfield
   get thisPassword
   if it is <whateveryouwant> then
     ##do your stuff
   else
     answer "Tentative illégale !"
    close this stack
   end if
end returninfield

on enterinfield
   returninfield
end enterinfield

on keydown whichKey
    put whichKey after thisPassword
   put "*" after field "pass"
end keyDown

on backspaceKey
   put empty into field "pass"
   put "" into thisPassword
end backspaceKey

on deleteKey
   put empty into field "pass"
   put "" into thisPassword
end deleteKey


Hope this helps.


Greetings.

Yves COPPE
yvescoppe at skynet.be


More information about the use-livecode mailing list