A type-in box lets you enter values from the keyboard. G2 uses what you enter as the new value of the variable or parameter that you associate with the type-in box. Here are several type-in boxes, representing several symbolic variables:
![]() |
Type-in boxes are specific to the variable or parameter type they represent. G2 does not permit you to enter a value of the wrong type. For example, if you try to enter text into a type-in box that is assigned to a float variable, the variable retains its previous value, and G2 signals an error.
Specifying the Activation Value
The Value-on-activation attribute indicates what value, if any, appears in the type-in box upon activation. The value could be any value of the appropriate type for the variable or parameter that the type-in box represents. Value-on-activation attribute and the variable or parameter has an initial value, that value appears when the type-in box is activated.
As soon as the variable or parameter for the type-in box receives a value, G2 replaces the asterisks or the default datatype value with the new value. The size of the type-in box increases or decreases to accommodate the current value.
Specifying the Formatting Style
The Format-for-type-in-box attribute specifies the format in which to display the value. The default value is default, indicating that G2 displays the value in the appropriate format for the datatype of the variable or parameter. ddd.dddd format, which indicates the precision of the value on either side of the decimal point, where a d represents each digit.
Tip: If you enter a value that exceeds the specified format, G2 displays it as an exponential value.
Defining the Selection Status
The Blank-for-type-in? attribute defines whether to clear the type-in box when you select it. The default value of yes automatically deletes any value when you click in the box to enter a value. Changing the default to no maintains the previous value, which you can then edit. Specifying Editor Options
The Have-edit-option-buttons-for-type-in? attribute specifies whether certain Text Editor buttons appear with the type-in box when you select it to change its value. The default is no. yes displays edit option buttons when you click in the type-in box. The next example show the Text Editor buttons that appear after pressing a space character after the name.
![]() |
Class-Specific Attributes
The class-specific attributes of type-in boxes are: