FormGroupControl.topValue Method

Definition

Overloads

topValue()

Sets or returns the vertical position of a form group control in pixels.

topValue(Int32)

topValue()

Sets or returns the vertical position of a form group control in pixels.

public:
 override int topValue();
public override int topValue ();
override this.topValue : unit -> int
Public Overrides Function topValue () As Integer

Returns

An Integer data type value that specifies the vertical position of a form group control.

Remarks

The vertical position is not changed unless the top mode is set for an exact pixel value. For more information, see the topMode method.

The following example shows a call to the topValue method that sets the vertical position to 50 pixels.

void FormGoupControl() 
{ 
    Args args; 
    Form form; 
    FormRun formRun; 
    FormBuildDesign formBuildDesign; 
    FormBuildDataSource formBuildDataSource; 
    FormBuildStringControl formBuildStringControl; 
    FormBuildGroupControl formBuildGroupControl; 
    FormGroupControl formGroupControl; 
    int idx; 
    DictTable dictTable; 
    CustTable custTable; 
    // Create the form header. 
    form = new Form(); 
    // Add data sources to the form. 
    dictTable = new DictTable(tableNum(custTable)); 
    formBuildDataSource = form.addDataSource(dictTable.name()); 
    formBuildDataSource.table(dictTable.id()); 
    // Create the form design. 
    formBuildDesign = form.addDesign("Design"); 
    formBuildDesign.caption("myForm"); 
    // Add controls. 
    formBuildGroupControl = 
 formBuildDesign.addControl(FormControlType::Group,"Group"); 
    idx = formBuildGroupControl.id(); 
    formBuildStringControl = 
 formBuildGroupControl.addControl(FormControlType::String,"String"); 
    // Add data fields to the controls. 
    formBuildGroupControl.dataSource(formBuildDataSource.id()); 
    formBuildStringControl.dataSource(formBuildDataSource.id()); 
    formBuildStringControl.dataField(2); 
    args = new Args(); 
    args.object(form); 
    // Create the run-time form. 
    formRun = classfactory.formRunClass(args); 
    formRun.run(); 
    formRun.detach(); 
    formGroupControl = formRun.control(idx); 
    formGroupControl.topMode(-1); 
    formGroupControl.topValue(50); 
}

Applies to

topValue(Int32)

public:
 override int topValue(int _value);
public override int topValue (int _value);
override this.topValue : int -> int
Public Overrides Function topValue (_value As Integer) As Integer

Parameters

_value
Int32

An Integer data type that specifies the vertical position.

Returns

Applies to