Skip to main content

Text rotation (TextRotation)

Text rotation (TextRotation) is a setting that determines the rotation angle of text within an item in iRidi Studio and i3Pro. It changes the text orientation to improve readability or match the interface design.

Items that support this setting:

  • Button
  • Label
  • Multistate Button
  • Trigger Button
  • Up/Down Button
  • Level
  • Multistate Level
  • Circular Level
  • Multistate Circular Level
  • Joystick
  • Virtual Key

This setting is not available for other items.

Available values​

TextRotation accepts only fixed values:

  • 0° - text is displayed in the standard horizontal orientation.
  • 90° - text is rotated clockwise by 90 degrees.
  • 180° - text is rotated by 180 degrees.
  • 270° - text is rotated clockwise by 270 degrees.

TextRotation01.png

Values that are not multiples of 90 degrees (for example, 45°, 123°) are ignored.

When TextRotation changes, the text remains readable, but its position relative to the item boundaries may change.

Configuring TextRotation in iRidi Studio​

  1. Through item properties
  • Select the item.
  • In the project sidebar, open the States tab and select TextRotation.
  • Set one of the supported values (0, 90, 180, 270) and press Enter.

TextRotation02.png

  1. Through the quick toolbar
  • Select the item.
  • Open the text editor, change Rotation, and press Enter.

TextRotation03.png

Configuring TextRotation in Java Script​

Specify TextRotation as follows:

TextRotation = available values (0, 90, 180, 270)

GetState = item state (0 - inactive, 1 - active)

IR.GetItem("Page 1").GetItem("Item 1").GetState(0).TextRotation = 270; // угол поворота текста

An attempt to set an invalid value (for example, 45) is ignored.