Author Topic: NumericSevenSegment Color?  (Read 1262 times)

rbeavers

  • Newbie
  • *
  • Posts: 19
    • View Profile
NumericSevenSegment Color?
« on: December 08, 2016, 12:48:27 PM »
Hi Archie,
   Is there a way to define the Forground Color of the NumericSevenSegment display? Ie: "White" when Idle, "Amber" when Paused, "Green" when Running, "Red" when Faulted? Maybe a property I can pass a color to in Hex?

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: NumericSevenSegment Color?
« Reply #1 on: December 10, 2016, 08:24:31 AM »
Just by looking at the current design of this control, you should be able to change the BackColor either through the code or by creating a new property (dependent on what defines your Idle/Paused/Running/Faulted states).

You can manually change the BackColor in the DesignMode just to see what it would look like.

rbeavers

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: NumericSevenSegment Color?
« Reply #2 on: December 10, 2016, 01:50:35 PM »
ForeColor is what I really need... Although the ForeColor property is available in the property list, it seems to have no effect.

BackColor yields some pretty bizarre result when the only ForeColor the control allows is Red & Green through the "MaxValueForRed property.

Is there a way that I can modify the NumericSevenSegment control code? If so How?

Thanks,
-Rob

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: NumericSevenSegment Color?
« Reply #3 on: December 10, 2016, 03:17:31 PM »
It would probably take modifying the control itself, which can only Archie do.

You could possibly think of a different approach and modify your page.

One possible approach can be seen in the attached picture, with SimpleLEDs positioned next to the NumericSevenSegment.
All LEDs have been turned ON just to be clearly visible in the picture.
SimpleLEDs have blinking feature as well.

rbeavers

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: NumericSevenSegment Color?
« Reply #4 on: December 10, 2016, 03:47:28 PM »
Thank you Godra! This will be the approach we will take if modifying the control is not an option.

Thanks again!
-Rob

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: NumericSevenSegment Color?
« Reply #5 on: December 10, 2016, 07:03:09 PM »
The 7 segment display is actually based on bitmap graphics, so changing colors can only be done by creating new graphic images for each color. The current version only has the 2 color options of red and green which can only be controlled by the MaxValueForRed property.

Since this control attempts to use a transparent background, I have noticed some residual colors on certain PCs. Not sure why unless it has something to do with the way Windows tries to anti-alias the graphics.

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: NumericSevenSegment Color?
« Reply #6 on: December 11, 2016, 12:53:54 PM »
Rob,

SimpleLEDMatrixArray could possibly work the way you want it since it allows the LED color to be changed.
Do note that the strings it displays start from left edge.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: NumericSevenSegment Color?
« Reply #7 on: January 16, 2017, 08:32:09 AM »
Version 3.99t now includes a SevenSegment2 which allows a bit more flexibility of color selection.