SetBackgroundColor
function SetBackgroundColor(r: any = null, g: any = null, b: any = null, bNone: any = null): void
Description
Sets the background color to the current form.
Parameters
- r
any
null Red color component value.
- g
any
null Green color component value.
- b
any
null Blue color component value.
- bNone
any
null Defines that background color will not be set.
Returns
void
Try It
var oDocument = Api.GetDocument();
var oTextForm = Api.CreateTextForm({"key": "Personal information", "tip": "Enter your first name", "required": true, "placeholder": "First name", "comb": true, "maxCharacters": 10, "cellWidth": 3, "multiLine": false, "autoFit": false});
var oParagraph = oDocument.GetElement(0);
oParagraph.AddElement(oTextForm);
oTextForm.SetBackgroundColor(255, 111, 61);