Programming with Reflection

image\rwnprg32.gif PasswordBox method


Syntax Result = object.PasswordBox(Prompt, [Title], [Default])



Opens a dialog box containing a prompt and a text box for user input, and returns the contents of the text box after the user clicks OK. As the user types in the text box, characters are echoed as asterisks.

The user cannot type special non-printing characters in the password box. So if your host password includes any such characters, the PasswordBox method will not work.


Prompt Argument Type: String
A string expression containing the text to be shown in the dialog box. The maximum length of this value ranges from about 160 to 255 characters. Prompts longer than one line automatically break at the nearest space and wrap to the next line.

Title Argument Type: String
Specifies the caption that appears in the dialog box's title bar. The default value is the name of the Reflection product ("Reflection for HP," "Reflection for UNIX and OpenVMS," or "Reflection for ReGIS Graphics").

Default Argument Type: String
A string expression that appears in the text box as the default response. The string is not displayed in the dialog box; a string of asterisks equivalent in length to the actual string is displayed. It's generally appropriate to omit this argument. The default is an empty string ("").


Result Return type: String
If the user presses Enter or clicks the OK button, Result contains the text in the input box. If the user clicks Cancel, Result contains Default.


image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command