|
A field for data entry in a dialog window.
Syntax
<TextBox
name="name-literal"
select="expr"
multiline="multiline"
passwordchar="passwordchar"
</TextBox>
multiline ::= { yes | no }
|
If the optional select attribute is used, its value is displayed in the field when the runtime user enters the dialog. It is a default value: the user can choose to overwrite it. Expr is either a string literal or an XPath expression.
If you set multiline="yes", the field is allowed to be multi-line, that is: it is able to have variable height. Use the h attribute to set the height you want:
<TextBox name="editor" multiline="yes" h="150" w="250" />
|
The optional passwordchar attribute may be used to mask password input. It masks each character typed by the runtime user by displaying passwordchar instead of the input character. passwordchar is a single non‑whitespace character, typically an asterisk ( * ).
Example
This example asks the user to provide a password.
<example xmlns:pc="Processing.Command" xmlns:valuedialog="Dialog.Result" xmlns:assign="Processing.Command.Assign" pc:hideme="true">
<pc:Dialog
valuedialog:passwordvalue="/Forms/Form/TextBox[@name='password']/text()">
<Form w="700" h="200">
<Title>TextBox example</Title>
<Label dx="10" dy="20">Please enter password.</Label>
<Label newline="true" dx="10" dy="20" w="50">Password</Label>
<TextBox dx="10" w="150" name="password" passwordchar="*" />
<Button dx="10" dy="20" newline="true"><Result>OK</Result>OK</Button>
</Form>
</pc:Dialog>
<pc:terminate test="$valuedialog:passwordvalue=''" msg="Error: Password must be specified."/>
</example>
|
See also
pc:Dialog
|