Type: Integer
Availability: Read or write at run time only
The inputType property contains the type of input (if any) that is accepted by a cell of a table. You can assign the inputType property to each cell, row, and column of a Table control. The types of input that can be accepted are listed in the following table.
Constant | Value | Description |
---|---|---|
InputType_None | 0 | Cell does not allow user input (the default). |
InputType_CheckBox | 1 | The cell displays a check box bitmap, which can be toggled by using the mouse, space bar, or ENTER key. The text of the cell is set to 0 or 1, according to the state. The initial value is set to 0 if there is no text or the first character of any text is 0; if not, it is set to 1. User changes to the state of the check box control generate a change event. |
InputType_TextBox | 2 | When the cell is current, the cell allows text input. As the text changes, the change event is called. The maxLength property can be set for the cell to control the amount of text that can be entered. The default value is 0 (that is, there is no limit). |
InputType_ComboBox | 3 | ComboBox (non-sorted drop-down list only). Users can select an entry from the list by using the mouse or an arrow or RETURN key. The comboList property sets the list entries, and the comboIndex property sets the current selected entry. When the user selects a list entry or when logic sets a comboIndex property value, the value of the text property for the cell is set to the list entry. When the user selects a new entry, a change event is generated. If logic sets the text property of a cell, that text must correspond exactly to one of the list entries. |
InputType_TextNumeric | 4 | When the cell is current, the cell allows only numeric text input. As the text changes, the change event is called. The maxLength property can be set for the cell, to control the amount of text that can be entered. The default value is 0 (that is, there is no limit). Use the decimals property if you want to enter decimal places into cells that accept numeric text input. |
InputType_Default | 5 | Returns the cell, column, row, or sheet to its default inputType property setting. This constant is useful, for example, if you set a column to InputType_None so that it is temporarily disabled, and you later want to enable its input using the default input type. |
InputType_SignedNumeric | 6 | Handles the entry of a signed numeric value in a table input field. Use the decimals property if you want to enter decimal places into cells that accept signed numeric input. |
InputType_EditMask | 7 | The input control acts like an edit mask text box for input by default. For details about setting the mask used for input for a cell, row, column, or sheet, see the JadeEditMask class or the Table class editMask property. |
When using a numeric text box (the inputType property is set to InputType_TextNumeric), the following events are still fired when the entered key is invalid.
This enables the form to process keys such as the ENTER key in the Form::keyDown or keyPress events and the control to process these keys in its keyDown event, therefore allowing application users to use the numeric keypad when a form requires a large amount of numeric data entry.
The inputType property applies to the current sheet, row, and column for the table.
The accessMode property determines whether the inputType property is for the current sheet, cell, column, or row is being accessed.
For a TextBox control, pressing the left arrow key when the vertical bar symbol (|) is in the left position moves the focus one cell left. Similarly, pressing the right arrow key advances the focus to the next cell on the right when the vertical bar symbol is at the end of the text.
When focused on a text or combo entry cell, the normal table cell movement functions controlled by arrow keys, HOME, END, PAGE UP, PAGE DOWN, and ENTER keys may have specific meaning to the text or combo box. Use the ALT key in combination with the navigation key to override the text box or combo box actions.
Any picture assigned to a cell with the inputType property set to a non-zero value is displayed only when that cell does not have focus. Similarly, the cell alignment property is affected only when the cell does not have focus.
The check box type is always displayed with centered alignment.
The size of a row is automatically enlarged to fit the minimum size text or combo box.
When the inputType property value is set to InputType_ComboBox or InputType_TextBox, you can assign a control object to the cell, to enable your logic to affect input from these controls.
The object is associated with the cell, row, or column by referencing the cellControl property when the input type is set to text box or combo box.
If the cell, row, or column already contains an effective cellControl property value, the existing object is returned.
When an object is associated with the default input associated with table cells of the required type, the control object can then be manipulated from the logic of that control. This control receives neither focus nor cellInputReady events.
When a cell is initialized to receive input from a default inputType property, the input control is set up as follows, and any attempt to modify these properties results in undefined results.
The control position and size are set to cover the cell.
By default, the backColor, foreColor, and the font properties use the values associated with the current cell.
The alignment of the text box is set to the alignment of the cell.
The text in the text box text is set to the value of the text in the cell.
The maxLength property of the text box is set corresponding to the value of the inputType and decimals properties of the cell.
The combo box is cleared.
The combo box is filled with the entries from the comboList property of the cell.
The listIndex property of the combo box is set corresponding to the text of the cell.
The focus is moved to the text box or the combo box.
The following examples show the use of the inputType property.
buttonAddColumn_click(btn : Button input) updating; begin if selectedColumn <> null then table1.inputType := Table.InputType_TextBox; table1.insertColumn(selectedColumn); table1.clearAllSelected; selectedColumn := null; comboBoxColMoveTo.addItem("Move to Column " & (comboBoxColMoveTo.listCount + 1).String); comboBoxColumns.addItem((comboBoxColumns.listCount + 1).String); refresh; else app.msgBox("You must select a column", "No column selected", MsgBox_OK_Only); return; endif; end;
foreach count in 1 to 10 do // allows decimal input of column 9 for 10 rows table1.row := count; table1.accessCell(count, 9); table1.accessedCell.inputType := Table.InputType_SignedNumeric; table1.accessedCell.decimals := 2; endforeach;