Delphi InputBox for password entry?

后端 未结 5 1421
面向向阳花
面向向阳花 2021-01-04 02:08

Inputbox:

answer:=Inputbox(\'a\',\'b\',\'c\');

works good, but I\'m looking for a masked one, like a password box where you only see little

5条回答
  •  孤城傲影
    2021-01-04 02:48

    In XE2, InputBox() and InputQuery() were updated to natively support masking the TEdit input, although that feature has not been documented yet. If the first character of the APrompt parameter is set to any value < #32 then the TEdit.PasswordChar will be set to *, eg:

    answer := InputBox('a', #31'b', 'c');
    

提交回复
热议问题