FormListControl.bold Method
Gets or sets the font weight that is used fort text in the control.
Syntax
public int bold([int value])
Run On
Client
Parameters
- value
Type: int
An Integer data type that specifies the font weight.
Return Value
Type: int
An integer value between 0 (zero) and 9, inclusive.
Remarks
The integer that is returned contains the weight of the font as follows:
0 – Use the default font weight.
1 – Thin.
2 – Extra-light.
3 – Light.
4 – Normal.
5 – Medium.
6 – Semibold.
7 – Bold.
8 – Extra-bold.
9 – Heavy.
Examples
The following example shows a call to the bold method to set the font weight to 9, which indicates heavy.
static void createForm2(Args _args)
{
Args args;
Form form;
FormRun formRun;
FormBuildDesign formBuildDesign;
FormBuildDataSource formBuildDataSource;
FormBuildListControl formBuildListControl;
FormListControl formListControl;
int idx4;
DictTable dictTable;
CustTable custTable;
int boldLevel;
// 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 a form list control.
formBuildListControl =
formBuildDesign.addControl(FormControlType::ListView,"List");
idx4 = formBuildListControl.id();
args = new Args();
args.object(form);
// Create the run-time form.
formRun = classfactory.formRunClass(args);
formRun.run();
formRun.detach();
formListControl = formRun.control(idx4);
boldLevel = formListControl.bold(9);
}