Author Topic: [WIDGET] Manual Layout - ScalePos and ScaleSize for Line element  (Read 5318 times)

Offline Challenger

  • PLUS+1 User
  • **
  • Posts: 7
  • Karma: +0/-0
[WIDGET] Manual Layout - ScalePos and ScaleSize for Line element
« on: September 29, 2021, 04:14:30 PM »
Hi everyone,

I made my own gauge widget. It is composed of a background (an SVG image) on the back, above a line and on top a frame (an SVG image).
Inside the Screen definition of my widget, the coordinates of the line are calculated at each loop (X and Y of Begin Point & X and Y of End Point).
In the Manual Layout section (in the Inspector of the Line element), I selected TRUE for ScalePos and ScaleSize.
I did the same for all the elements that constitute my widget (i.e the image of the background and the image of the frame).
I dragged my widget to my main screen, and I resized my widget (which is too big).
All the elements are automatically resized (including the two images and the line element).
When I change manually the coordinates of the Line inside the screen definition of my widget, it works fine on my main screen with the resized widget.

However when I upload the soft to my display DM100T, it seems that the display DOES NOT resize the coordinates of the Begin and End Point of my line element (only) on my main screen. In result, I have two images well resized (so as the widget) and a big line outside of its path, and I do not know understand why. All my parameters in link with ScalePos/Size are set to TRUE.

The only solution that I found is to make my widget with the right sizes directly inside the screen definition, and I avoid the user to resize the widget.
But I would prefer to have a flexible widget, I mean easy to risez with just the mouse. If somebody can help me, I would really appreciate. Thanks.