GetIconYPos
Gets button widget icon y position.
Syntax
expression.GetIconYPos();
expression - A variable that represents a ApiButtonWidget class.
Parameters
This method doesn't have any parameters.
Returns
Example
This example gets icon Y position from field with image.
- Code
- Result
let doc = Api.GetDocument();
let page = doc.GetPage(0);
let buttonField = Api.CreateImageField([10, 10, 120, 100]);
page.AddObject(buttonField);
let widgets = buttonField.GetAllWidgets();
widgets[0].SetLayout('iconTextV');
widgets[0].SetImage('https://static.onlyoffice.com/assets/docs/samples/img/onlyoffice_logo.png', 'normal');
widgets[0].SetLabel('Icon Y position is: ' + widgets[0].GetIconXPos());