Share via


Properties

The EditField HTC supports the following properties:

  • dirty
  • disabled
  • displayvalue
  • options
  • prompt
  • readonly
  • required
  • selected
  • valid
  • value

dirty

The dirty property tracks whether the value in the EditField HTC has changed. Legal values are True and False. A value of True indicates that the value of the EditField HTC has changed, and False indicates that the value of the EditField HTC has not changed.

This property is read-only.

Return to top

disabled

The disabled property tracks whether the EditField HTC has been disabled. Legal values are True and False. A value of True indicates that the EditField HTC has been disabled, and False indicates that the EditField HTC has not been disabled.

Disabled controls are dimmed, including both text entry and button portions of the control, if present, and input is not accepted.

This property is read/write.

Return to top

displayvalue

The displayvalue property, which should only be accessed when the type of the EditField HTC is select, contains the display name for the current value.

This property is read-only.

Return to top

options

The options property, which should only be accessed when the type of the EditField HTC is select, contains the collection of option elements (HTML Div elements) for use in iterative loops.

This property is read-only.

Return to top

prompt

The prompt property is used to set and retrieve the prompt that is displayed when the EditField HTC has no value.

Note that EditField HTCs of the select type will only display the prompt when the current value is not associated with any of the select options.

By default, the prompt property has a distinct default value for each of the EditField types. If no prompt is needed, set the prompt property to an empty string.

This property is read/write.

Return to top

readonly

The readonly property tracks whether the EditField HTC has been set to read-only. Legal values are True and False. A value of True indicates that the EditField HTC has been set to read-only, and False indicates that the EditField HTC has not been set to read-only.

The background color for read-only controls is gray, and the button portion of the control, if present, is removed.

This property is read/write.

Return to top

required

The required property tracks whether the EditField HTC requires user input. Requiring input is defined as being configured as required, but having no current value. Legal values are True and False. A value of True indicates that user input is required, and False indicates that user input is not required.

Required controls with an empty value have a yellow background color.

The OnRequire event fires whenever the value of this property changes. When the disabled property is set to True, the required property is automatically set to False and the onRequire event is fired.

The required property is always False for EditField HTCs of type select and boolean.

This property is read-only.

Return to top

selected

The selected property, which should only be accessed when the type of the EditField HTC is select, returns the option element (HTML Div element) currently selected in the list of options.

This property is read-only.

Return to top

valid

The valid property tracks whether the current value in the EditField is valid according to constraints imposed by the configuration information. Legal values are True and False. A value of True indicates that the current value is valid, and False indicates that the current value is not valid.

Controls with a value that is not valid have a yellow background color after the control loses focus.

The OnValid event fires whenever the value of this property changes.

The valid property is always True for EditField HTCs of type boolean.

This property is read-only.

Return to top

value

The value property contains the value currently in the EditField, if any.

The OnChange event fires whenever the value of this property changes and the EditField HTC loses focus.

This property is read/write.

Return to top

Copyright © 2005 Microsoft Corporation.
All rights reserved.