A value associated with a push button. This value can be used to determine what happens when the button is pressed by a runtime user.
Syntax
When the dialog that contains the button is run, result-value is assigned to the result attribute of the Form element in the dialog's embedded XML. This makes it possible to use result-value to test whether the runtime user pressed the button (or, in a button group, WHICH button the user pressed). The Example demonstrates this.
You can only use a limited number of allowed values for the value of the Result element, because the Windows OS needs to know how to interpret the event:
Return value (case-insensitive)
|
Interpreted by Windows OS as
|
ok
|
OK
|
cancel
|
Cancel
|
abort
|
Abort
|
ignore
|
Ignore
|
no
|
No
|
none
|
None
|
retry
|
Retry
|
yes
|
Yes
|
(other)
|
Cancel
|
Example
<example xmlns:pc="Processing.Command" xmlns:valuedialog="Dialog.Result" xmlns:assign="Processing.Command.Assign" pc:hideme="true">
<pc:assign-default
valuedialog:title="Button example"
valuedialog:textlabel = "Please press Proceed or Cancel." />
<pc:Dialog
valuedialog:ok="Forms/Form/@result='OK'" >
<Form w="700" h="200">
<Title><pc:value-of select="$valuedialog:title"/></Title>
<Label dx="10" dy="20"><pc:value-of select="$valuedialog:textlabel"/></Label>
<Button dx="10" dy="20" newline="true"><Result>OK</Result>Proceed</Button>
<Button><Result>Cancel</Result>Cancel</Button>
</Form>
</pc:Dialog>
<pc:if-then test="$valuedialog:ok"><pc:value-of select="'User pressed Proceed.'"/></pc:if-then>
</example>
|
See also
Button
pc:Dialog
|