Author Topic: Moving image by percentage  (Read 13 times)

Offline jonbhanson

  • PLUS+1 User
  • **
  • Posts: 6
  • Karma: +0/-0
Moving image by percentage
« on: Today at 04:24:17 PM »
In the vector-based screen editor, I have an image that I would like to move across the widget.  I'm doing this by setting the insertion point X signal to an input value.

So, if the input value is 0, the image would be at the far left of the screen, and if the value is 100, the image would be at the far right of the screen.
It seems that although I can set static values based on percentage, signal values are based on coordinates instead.

So, I scale the percentage in my program to the X coordinates for the right and left edges of the screen and put these coordinates on the input signal.  This works fine until I need to resize the widget.  If I resize the widget, the coordinate values are no longer correct.

How can I accomplish this?

Thanks,
Jon