Dynamic X and Y Positions

Discuss issues and ideas you have to configuring displays with PowerVision
chagnonp
Posts: 14
Joined: Tue Dec 21, 2010 10:08 am

Dynamic X and Y Positions

Post by chagnonp » Tue Mar 22, 2011 6:07 am

I was wondering if it were possible to change the x and/or y positions of image/text widgets through scripting? Thanks
jtabb
Enovation Controls Development
Enovation Controls Development
Posts: 37
Joined: Mon Apr 04, 2011 8:59 am

Re: Dynamic X and Y Positions

Post by jtabb » Wed Jul 13, 2011 10:29 am

chagnonp,

Sorry for the late response. You may already have had an answer.

You can move objects using the screen application in either scripts or state machines. To move an object use:

Code: Select all

screenApiMove(uint screenObjectId, uint xPos, uint yPos)
So the code below would move an widget named IW_1 to position (0,0).

Code: Select all

screenApiMove(screenObjectID(IW_1), 0, 0);
processScreenApi();
processScreenApi is required to execute screen functions.

Thanks,
jtabb
FW Murphy Development Team