FormGroupControl.topValue Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
}