Author Topic: Rotational Indicator Compas Directions  (Read 1163 times)

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Rotational Indicator Compas Directions
« on: January 30, 2019, 05:49:47 PM »
I am using the    RotationalPositionIndicator.vb and looking for a way to change the font of the direction labels N,S,E,W and I don't see it am I blind?I looked at the code with an editor and don't see anything other than where the font is hard coded
They are really huge as they are and do not work well with small diameter dials.
If the option isn't there what code could add?Thank you!
David

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Rotational Indicator Compas Directions
« Reply #1 on: January 30, 2019, 05:59:22 PM »
The one that is part of the default solution has those hard coded as Bell MT font which cannot be changed. If you use the one from the Additional Components, you can modify the code:

https://www.advancedhmi.com/forum/index.php?topic=1143

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Rotational Indicator Compas Directions
« Reply #2 on: January 30, 2019, 06:35:57 PM »
The one that is part of the default solution has those hard coded as Bell MT font which cannot be changed. If you use the one from the Additional Components, you can modify the code:

https://www.advancedhmi.com/forum/index.php?topic=1143
Thanks Archie, Before I came back and saw your post I  poked around and changed the font to Arial that was in the file Much better----

On that note,  I know basically nothing about writing VB but I have poked around and experimented changing files with several programming languages including machine language and that is how I found where to change that font. So it looks like adding code to these controls is not difficult if I know how to write it.
Can I copy code from another control or from another part of this one to add the option of changing fonts from the toolbox?

David

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Rotational Indicator Compas Directions
« Reply #3 on: January 30, 2019, 06:51:32 PM »
So it looks like adding code to these controls is not difficult if I know how to write it.
Can I copy code from another control or from another part of this one to add the option of changing fonts from the toolbox?
As with anything, it is only seems difficult until you learn it. Understanding Object Oriented Programming goes a long way when it comes to modifying or creating controls for AdvancedHMI. The first important concept is to understand properties. If you look at any of the existing files you will see a section of properties that all follow the same pattern. Visual Studio uses these properties to add things to the Properties Window during design time.