What happens if they use cut and paste features, highlighting different
portions of the asterisks?

The bottom line is that you shouldn't be masking anyway, but if you are
going to, using fonts is the easiest way.

----------
Bradly J. Barton - [EMAIL PROTECTED]
Jenies Technologies Incorporated
(972) 602-1835
http://www.JTI.net
http://HandAble.com

----- Original Message -----
From: "Sumita Malik" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 7:38 AM
Subject: Re:Simulating passwd text box


Hi All,
Why can't we look for a simpler solution tha n goin to FONTS n all?
Here, this works:

As soon as char is entered, trap it ( before it gets to fld Enter) , keep it
in array or someting in ur application, n insert asterisk in field !!

 static char sTrapped [31] = "\0";  // assuming max len of field is 30
   FieldPtr  fldP;                               // passwd field pointer
   int   iLen = 0;

case keyDownEvent:
  fldP = ( FieldPtr ) GetObjectPtr (MainPassField);
   iLen = FldGetTextLength ( fldP);
   sTrapped [ iLen] =  eventP->data.keyDown.chr;
   FldInsert ( fldP, "*", StrLen("*"));
   handled = true;                                                // Don't
forget this
   break;

Now when u finished entering, u will have all what u typed in array
sTrapped.
With this, though, u have to write some small code to handle backspace n
all, but thats not a problem.

regards,
SM


--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to