STEIN@UCONNVM.BITNET (Alan Stein) (02/26/91)
I'd like to be able to enter text into a dialog box without it appearing on the screen, in order to secretly enter a password. Is there a reasonable way of doing that? (I'm using Orca/C.) __________________________________________________________ | | | Alan H. Stein | stein@uconnvm.bitnet | | Department of Mathematics | | | University of Connecticut | Compu$erve 71545,1500 | | 32 Hillside Avenue | GEnie ah.stein | | Waterbury, CT 06710 | SNET (203) 757-1231 | |__________________________________________________________|
JWANKERL@UTCVM.BITNET ("Josef W. Wankerl") (02/27/91)
On Tue, 26 Feb 91 08:31:47 EST Alan Stein said: >I'd like to be able to enter text into a dialog box without it appearing >on the screen, in order to secretly enter a password. Is there a reasonable >way of doing that? (I'm using Orca/C.) Sure -- just pull up a LineEdit control and set the password bit. Everything typed to the control will appear as asterisks. > __________________________________________________________ >| | >| Alan H. Stein | stein@uconnvm.bitnet | >| Department of Mathematics | | >| University of Connecticut | Compu$erve 71545,1500 | >| 32 Hillside Avenue | GEnie ah.stein | >| Waterbury, CT 06710 | SNET (203) 757-1231 | >|__________________________________________________________| -- ===> Josef W. Wankerl, Technical Editor for GS+ Magazine BITNET: JWANKERL@UTCVM.BITNET | America Online: JWankerl ProLine: jwankerl@pro-gsplus |-------------------------------- Internet: jwankerl@pro-gsplus.cts.com | "I am a Viking" -Y. Malmsteen
STEIN@UCONNVM.BITNET (Alan Stein) (02/27/91)
Thanks. __________________________________________________________ | | | Alan H. Stein | stein@uconnvm.bitnet | | Department of Mathematics | | | University of Connecticut | Compu$erve 71545,1500 | | 32 Hillside Avenue | GEnie ah.stein | | Waterbury, CT 06710 | SNET (203) 757-1231 | |__________________________________________________________|
dzimmerman@gnh-tff.cts.com (Daniel Zimmerman) (02/28/91)
>> I'd like to enter text into a dialog box without it appearing on the >> screen... Well, the LineEdit Extended Control supports a great little feature called a "password field", which lets you do just that! Unfortunately, Extended Controls are not really supported in dialogs. If you use NewWindow2 to make a dialog-like box and TaskMaster to treat it modally, it will work, or you can use the DTS FakeModalDialog routines (available from apple.com, I'm sure)... Anyway, to make the LE control a "password field", just set the high-order bit of the "maxSize" word in the control template to equal 1. The default character to echo is "*" - to change it, put the ASCII value of the character you want to echo in the "lePWChar" field of the LineEdit record for the control (the last word in the LineEdit record, at offset $38). ------------------------------------------------------------------------------ Daniel M. Zimmerman InterNet - dzimmerman@gnh-tff.cts.com TFF Enterprises America Online - Surak TFF CompuServe - 76407,2246 "Learn reason above all. Learn clear thought; learn to know what is from what seems to be, and what you wish to be. This is the key to everything: the truth of reality, the reality of truth. What IS will set you free." - Surak Of Vulcan
jlevitsky@gnh-applesauce.cts.com (Joshua Levitsky) (02/28/91)
>I'd like to be able to enter text into a dialog box without it appearing on the screen, in oRDER TO SECRetly enter a password. Is there a reasonable way of doing that? (I'm using Orca/C.) Yes... you could set the text color to that of the background of the dialog box then just change the color back after the code is entered. This is the least painful way. -Joshie EMT /-------------------------------------------------------------------------\ | INET: jlevitsky@gnh-applesauce.cts.com | Drive safely; | | | 90% of the people| | UUCP: crash!pnet01!gnh-applesauce!jlevitsky | in the world | | | are created by | | ARPA: crash!pnet01!gnh-applesauce!jlevitsky@nosc.mil | accidents | \-------------------------------------------------------------------------/
STEIN@UCONNVM.BITNET (Alan Stein) (02/28/91)
I thought about changing the text color, but couldn't tell from the documentation how to do that. The ItemTemplate contains a pointer to a color table, but I didn't see a way of designating a particular color from that template for any part of the line edit item. __________________________________________________________ | | | Alan H. Stein | stein@uconnvm.bitnet | | Department of Mathematics | | | University of Connecticut | Compu$erve 71545,1500 | | 32 Hillside Avenue | GEnie ah.stein | | Waterbury, CT 06710 | SNET (203) 757-1231 | |__________________________________________________________|
acmfiu@serss0.fiu.edu (ACMFIU) (03/01/91)
In article <9102261333.AA27504@apple.com> STEIN@UCONNVM.BITNET (Alan Stein) writes: >I'd like to be able to enter text into a dialog box without it appearing >on the screen, in order to secretly enter a password. Is there a reasonable >way of doing that? (I'm using Orca/C.) alan, do you have the developer sample source code disks from last year? there was a program in it (i think either busybox or teach) that displayed how to do this. i think this added capability is new for sys 5.0.x and is documented in toolbox ref #3. albert