Author Topic: Label with Rotatable Text  (Read 4906 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Label with Rotatable Text
« on: December 27, 2016, 07:01:16 PM »
This is merely a modified version taken from here:

http://stackoverflow.com/questions/416897/how-do-i-rotate-a-label-in-c

- Download the attached file
- Open AdvancedHMI in Visual Studio
- In Solution Explorer expand down the AdvancedHMIControls project
- Right click the Support folder and select Add->Existing
- Browse to the file you downloaded from this thread
- Rebuild the solution
- you will now have an OrientedTextLabel in the Toolbox

IMPORTANT NOTE: If you change the rotation, you will also have to change the AutoSize property to False
« Last Edit: December 27, 2016, 07:02:48 PM by Archie »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Label with Rotatable Text
« Reply #1 on: December 29, 2016, 08:53:46 PM »
The attached control in this post is a modified version of Archie's code.

The old AntiClockwise text direction was renamed to Mirrored and the new version of the AntiClockwise is actually a readable text (check the attached picture).

This control also sets the AutoSize property to False on creation.
« Last Edit: January 01, 2017, 07:15:32 PM by Godra »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Label with Rotatable Text
« Reply #2 on: February 23, 2019, 07:01:48 PM »
It is possible to manipulate these labels to be used as connecting/diagram lines.

Attached picture shows a somewhat silly example.

Also, an unrelated suggestion for Archie to apply the option "None" for legend plates of the Momentary/Mushroom button controls and maybe make their back color as Black.
« Last Edit: February 23, 2019, 09:38:39 PM by Godra »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Label with Rotatable Text
« Reply #3 on: February 23, 2019, 08:30:18 PM »
Also an unrelated suggestion for Archie to apply the option "None" for legend plates of the Momentary/Mushroom button controls and maybe make their back color as Black.
This change will be in the next update.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Label with Rotatable Text
« Reply #4 on: February 26, 2019, 08:43:12 PM »
This is now fine with the Momentary button control.

Can the same be applied to the Mushroom button control?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Label with Rotatable Text
« Reply #5 on: February 26, 2019, 09:18:16 PM »
Can the same be applied to the Mushroom button control?
Consider it done

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Label with Rotatable Text
« Reply #6 on: March 02, 2019, 03:05:24 PM »
This is now fine with the Mushroom button control as well.