firstChange

firstChange(control: control-type input);

The firstChange event of the TextBox control is generated when the user performs keyboard or cut and paste actions that result in any of the following conditions.

Use this event to move logic from other key events when that logic is relevant only to the first time the text changes; for example, when the logic is recording that the text content has changed. As a result, removal of the other key events reduces the number of events that must be sent and processed for each key that is pressed.

The firstChange event method of the JadeEditMask class occurs when the user makes the first change on the displayed text or the isEmpty status of the control changes. It does not occur when you change the text property from logic (that is, dynamically).

For the JadeRichText or JadeTextEdit control class, a firstChange event occurs after a user change but before the change event, in the following cases.

The firstChange event method for the TextBox, JadeEditMask, JadeRichText, JadeTextEdit, and Form classes is not available from a Web browser.

The Form class firstChange event is generated when the first change to the values listed in the following table is made by a user to a control on a form.

Control Class Change
TextBox Change to the value of the text property
JadeEditMask Change to the value of the text property
JadeRichText and JadeTextEdit After a user change but before the change event (same rules as those that apply to the TextBox class firstChange event)
CheckBox Change to the value of the value property
OptionButton Change to the value of the value property
ComboBox Different entry selected (this does not apply to the text box portion of the combo box unless the text property change causes a different list entry to be selected)
ListBox Different list entry selected
Table Cell updated by the Control class automaticCellControl property, including default inputType property entry of CheckBox, TextBox, JadeEditMask, and ComboBox controls (but not when a different row or column is selected)

The control that has been changed is passed as the parameter to the event. By default, the firstChange event is generated once only, when the first of any of the changes listed in the above table has been made on a form. You can then determine that a data change has been made to a form without having to monitor changes to every control on that form.

The Form class resetFirstChange event enables you to reset all firstChange events on the form. In addition, you could use the resetFirstChange method inside the Form class firstChange event when the first change has been made to a control that is not to be counted as the first data change.

The Control class resetFirstChange event resets the firstChange event status of the control and all children of the control. As only the TextBox, JadeRichText, and JadeEditMask controls have a firstChange event, all other controls ignore the method other than to call the method on any children.