Related to the above. I am trying to get labels to overlay rectangles that I move and stretch to represent time durations of various states to our operators during a run.
If I take the left edge of the rectangle by using event.source.getComponent('rectangle').relX, and set the position with system.gui.transform, and coordspace 1, the label and rectangles' right edges are properly aligned.
If I then try to sum event.source.getComponent('rectangle').relX and event.source.getComponent('rectangle').width, I get a value that seems to always be the largest possible x value my window will permit.
If I write the event.source.getComponent('rectangle').width value to a label, I see that it is, again, the width of my window. I'm guessing that the 'width' property accessible in the Vision property editor for the rectangle is NOT the '.width' attribute associated with event.source.getComponent('rectangle'). It's surprising because X and .relX work fine.
I tried listing the attributes, using dict but somehow the Ignition components are written in such a way that they lack the attribute dicitonary? Wasn't aware this was even possible, I even checked the Jython documentation to be sure it is the same in both versions.
What am I doing wrong?