SetIconYPos
Sets button widget icon y position.
Syntax
expression.SetIconYPos(nPosY);
expression - A variable that represents a ApiButtonWidget class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| nPosY | Required | percentage | No description provided. |
Returns
boolean
Example
This example sets field with image icon position Y to 0.
- Code
- Result
let doc = Api.GetDocument();
let page = doc.GetPage(0);
let imageField = Api.CreateImageField([10, 10, 100, 100]);
page.AddObject(imageField);
let widgets = imageField.GetAllWidgets();
widgets[0].SetImage('https://static.onlyoffice.com/assets/docs/samples/img/onlyoffice_logo.png', 'normal');
widgets[0].SetScaleWhen('never');
widgets[0].SetIconYPos(0);