[comp.sys.amiga] string-gadgets

kvancamp@ardec.arpa (Ken Van Camp) (12/28/88)

 >I have the problem, that I want to ask the user for a password. This is
 >done with a stringgadget. To keep the password invisible, I tried to 
 >set FgPen= BgPen. But whereever I do that (either in the 
 >Windowstruct, Screenstruct, or their RastPorts)
 >the text is always rendered in color 1. Is this some sort of
 >hardcoded or what have I missed?

Yeah, this is a hard-coded limitation of string gadgets.  I'm afraid the
only thing you can do is redefine your palette -- unfortunately in your
case that'll probably make all your text in the requester invisible, not
just the input line.  Best thing to do is skip the string gadget and
read raw I/O.

                            --Ken Van Camp 
ARPANET:  kvancamp@PICA.ARMY.MIL -or- kvancamp@ARDEC.ARPA
BITNET:   (use above through normal gateways, like UBVM.CC.BUFFALO.EDU)
USENET:   pica.army.mil!kvancamp@UUNET.UU.NET
       "Support your local maillist: Give to the March of Electrons"

jimm@amiga.UUCP (Jim Mackraz) (12/30/88)

In article <6148@louie.udel.EDU> kvancamp@ardec.arpa (Ken Van Camp) writes:
)
) >I have the problem, that I want to ask the user for a password. This is
) >done with a stringgadget. To keep the password invisible, I tried to 
) >set FgPen= BgPen. But whereever I do that (either in the 
) >Windowstruct, Screenstruct, or their RastPorts)
) >the text is always rendered in color 1. Is this some sort of
) >hardcoded or what have I missed?
)
)Yeah, this is a hard-coded limitation of string gadgets.  I'm afraid the
)only thing you can do is redefine your palette -- unfortunately in your
)case that'll probably make all your text in the requester invisible, not
)just the input line.  Best thing to do is skip the string gadget and
)read raw I/O.
)
)                            --Ken Van Camp 

Ken is correct.  This limitation is removed in V1.4, for what that's worth.

Our (the mythical "our") recommendation is that you use a font which has
all characters 'X' or something.  But then, of course, you have the problem
of changing the font of a string gadget, which you also can't do to
easily.

Sigh.

It's probably easier just to role your own invisible text entry field,
since, after all, the hard part of string gadgets is scrolling.

	jimm
-- 
	Jim Mackraz, I and I Computing	  
	amiga!jimm	BIX:jmackraz
Opinions are my own.  Comments regarding the Amiga operating system, and
all others, are not to be taken as Commodore official policy.