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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 3619
    • 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: 579
    • 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 »