Changing text color

Forum Home Forums Understanding the Software Using Formulas Changing text color

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1726
    Rob
    Participant

    I would like to change the color of a dynamic text element with a formula. Is it possible to reference a dynamic text in a formula and change the background color or foreground color?

    #1728
    Mikhail
    Moderator

    There is a special color Status. You can find it in the color dropdown list (in the element properties tool window).
    You may add new statuses in Event Types table using Administrator app and specify the colors you need.

    I think we will add new feature to set colors dynamically because the existing approach is not comfortable in case of many colors.

    #1729
    Mikhail
    Moderator

    By default, statuses of input channels are set automatically. Also you can set them by formulas.

    #1731
    Rob
    Participant

    I found an alternate method:

    I use a static text element with Transparent background, then I place it over a dynamic picture that is loaded with colors I need.

    Thanks for the help!

    #1734
    Mikhail
    Moderator

    Interesting 🙂

    #10792
    AFP
    Participant

    Hello Mikhail,

    How can I set up input channels statuses by formulas in version 6 beta ?
    Can I get a formula template for that purpose ?

    #10802
    Mikhail
    Moderator

    Hello,
    You can use “;” to split a formula as you did in version 5.
    In version 6 you can also use a function to calculate channel data like that:
    NewData(1.23, 1)
    where 1.23 is value and 1 is status.

    #10860
    AFP
    Participant

    Thank you for the answer.
    I m a newbie in this application and I didn’t work with earlier versions alot.
    What I need for the moment is to have just a formula like :

    If channel Value between LimitA and Limit B then set status Y
    Else If channel Value between LimitC and Limit D then set status Z, etc.

    Could you help with such formula ?

    #10882
    Mikhail
    Moderator

    Try the formula that works for v5 and v6:

    public int MyStat()
    {
      if (1 <= Cnl && Cnl <= 2) // your limits
       return 100; // your status
      else if (3 <= Cnl && Cnl <= 4)
        return 200;
      else 
        return 300;
    }

    In the channel formula: Cnl; MyStat()

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.