I like to retrieve the exact location / position from an element that has alignment SM_ALIGNMENT.BOTTOM | SM_ALIGNMENT.RIGHT.
jForm.getLabel(‘myElement’).y, returns the form location of the element, but when the element is anchored SM_ALIGNMENT.BOTTOM | SM_ALIGNMENT.RIGHT, this location should be the position of the element in the window.
Joas:
The position depends on the size of the form in runtime, so you shouldn’t use the solutionModel for this, use the runtime functions instead:
elements.myElement.getLocationX();
elements.myElement.getLocationY();
Thanks for the tip Joas, but somehow .getLocationY() allways returns 0 (smartclient), using: ```
forms[vFormName].elements[vElementName].getLocationY();
The button is placed in the footer part of a tableview form, btw.
Should I consider this a Servoy issue or is my syntax wrong?
Servoy 6.0.4
Windows 7