ICtrlGroupConditions.GetControl

Syntax

GetControl(Column: Integer, Row: Integer): IControl;

None;

Parameters

Column. Index of the column, which contains a visual component.

Row. Index of row, which contains a visual component.

Description

The GetControl method returns the visual component added to element cell.

Comments

to add a visual component to element cell, use the IListView.InsertControl method.

Example

To execute an example, create a form given in the example for the ICtrlGroupConditions.AddRow method. Add the Button component named Button1 on the form and set the Text property to Unlock/Lock Edit Box.

Add a link to the Forms system assembly.

The example is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Control, AttrControl: IControl;
Begin
    
// Get visual components from the third and the fifth column of the second row
    Control := CtrlGroupConditions1.GetControl(41);
    AttrControl := CtrlGroupConditions1.GetControl(
21);
    
// Check component contents in the third column and determine whether the component is available in the fifth column
    If AttrControl.Text = "" Then
        Control.Enabled := 
False;
    
Else 
        Control.Enabled := 
True;
    
End If;     
End Sub Button1OnClick;

None.

After executing the example, a button is added to the form to lock/unlock edit box in the fifth column of the second row.

Clicking the Unlock/Lock Edit Box button checks box contents in the third column of the second row. If the box in the third column is empty, the edit box in the fifth column is locked:

If the box in the third box is not empty, the edit box in the fifth column is unlocked:

See also:

ICtrlGroupConditions