cellControl

Type: Control

Availability: Read or write at run time only

The cellControl property of the Table control allows control over the input and display within the table by defining a user-supplied control that is placed over the cell by default when that cell becomes current. This control can be of any Control type. The control receives all of the events for that control and it can be manipulated by your JADE logic, as required.

You can set this property for a sheet, row, column, or cell of the table.

Each control that is assigned by using this cellControl property is made a child of the table and is displayed or hidden, as required, as the current cell is changed. Changing the parent of that control away from the table clears all cellControl property values referring to that control.

The code fragment in the following example shows the use of the cellControl property.

table1.accessCell(table1.row, table1.column).cellControl := myTextBox;

When the table has focus and a cell with an effective cellControl value becomes the current cell or the cell position or size changes, the following actions are performed:

  1. The cellInputReady event method is called, allowing the control to initialize itself for that cell. This event passes the position and size of the cell where the control will be placed when returning from the event call. Your JADE logic can change these values, if required.

  2. When returning from the cellInputReady event method, the cell is positioned and resized as indicated.

  3. The control is then made visible.

  4. The control receives focus if it is enabled and is allowed focus.

It is the responsibility of the control to update the contents of the cell with any change. Unpredictable results may occur if the control is repositioned or resized outside the cellInputReady event method.

Use of this cellControl property is exclusive to the inputType property. If both properties have an effective value for a cell, the cellControl property takes precedence. If the cellControl property is not set and the inputType property is set to InputType_TextBox or InputType_ComboBox, JADE creates a control of the type specified in the inputType property, which you can then access.

To implement the handling of a TextBox control to achieve the same functionality as the default Table class InputType_TextBox value, only the following is required.

To implement the handling of a ComboBox control to achieve the same functionality as the default Table class InputType_ComboBox value, only the following is required when the combo box entries are already loaded.

The only other actions that are performed by the Table class parent of a cellControl property are:

For details about automatically controlling a ComboBox or TextBox control assigned to a Table control as a cellControl property (for example, when performance is an issue when running in JADE thin client mode over a slow link), see the Control class automaticCellControl property.