Rotation of panel / labels

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
4 posts • Page 1 of 1
mikek10
Posts:20
Joined: Wed Jun 26, 2019 4:05 pm

Rotation of panel / labels

Post by mikek10 »

Hi,

I have a panel that has several instances dynamically loaded by root panel. I would like each instance of the sub-panel to be displayed at a rotation specific to that instance. Each instance is loaded using the addSymbol function, there is an angle parameter that I was hoping would do this but I have found the behaviour of this is not as I hoped, for instance a rectangle within the panel displays as a parallelogram - probably as the centre of rotation is not the corner of the rectangle?

I therefore pass the rotation angle as a dollar parameter to the sub-panel and on intialise rotate the rectangle using its .rotation method - this works as I would like. The issue I now have is that I also need to rotate labels and textfields contained in the same sub-panel but cannot find a means to rotate these type of object directly?

Thanks in advance for any help.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Rotation of panel / labels

Post by leoknipp »

Every reference has a a reference point. This one is used as center for the rotation.
When rotating objects you have to take into account that not all objects can be rotated, e.g. rotating a text field or a button is not possible.

Best Regards
Leopold Knipp
Senior Support Specialist

mikek10
Posts:20
Joined: Wed Jun 26, 2019 4:05 pm

Re: Rotation of panel / labels

Post by mikek10 »

So even if I rotate the panel you are saying text fields and labels won't rotate? That seems like quite a major oversight considering its a simple task in visual studio or most other high level languages for producing GUIs! Its more work than I anticipated but could a custom EWO be a solution?

Additionally - if I set a rotation value in addSymbol and the panel reference point is set the same as the first corner of the rectangle I still get some instances where the display is a parallelogram rather than the rectangle it should be! if I rotate in addSymbol with a textfield or label in the panel the rotation is not performed which is probably due to the language limitation you already mentioned?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Rotation of panel / labels

Post by leoknipp »

If a reference contains an object which cannot be rotated the rotation parameter will be ignored when using addSymbol().

I made some tests with a reference containing of rotateable objects and addSymbol().
The rectangles will be a "parallelogram" if the scaling parameters do not have the same value. When the scaling parameters have the same value the rectangles are only rotated but not transformed.

Best Regards
Leopold Knipp
Senior Support Specialist

4 posts • Page 1 of 1