Jump to content

Numeric box dynamic color

Gabriel Franco

Recommended Posts

  • 3 months later...

I believe my twist on Ness's suggestion is a good work-around (I tested it, it works well and likely comes closer to what people actually need):

Use the available "Numeric Box" (set the layer = 2) with a transparent background and put that on top of a "Range Of Text Variable" box (send to background, set layer = 1). Typically you would set the Tag Link in the Range Of Text Variable box the same as the Numeric Value you put in the numeric box. Fill in constants or a variable in each of the "From" and "To" boxes of the collection of "Texts, Ranges" for the various background colors you desire.  For the "text" in the collection you create just enter " " for each, and set the background color as desired (foreground doesn't matter since it won't be displayed).

This gives you a variable to select the background color (can be the same variable) and it allows the background color to be selected from a list. I does not allow you to set the foreground color of the Numeric Box, see below for that.

If Unitronics created a Numeric Box with the Range Collection like the Range of Text Variable this would work even better because it would allow the changing of both foreground and background colors. In the Range Collection Unitronics would just need to substitute "###.##" OR "123.45" or what ever format is selected in the format portion instead of allowing the user to type in text. Then the programmer would have the option to select ranges or put variables in the ranges instead of constants that would dynamically change the colors from a pre-determined collection of colors. That is far more useful than just having to force the background to a particular color, and would only require adding one or two fields to the existing Numeric Box {Range Collection & possibly the Range Value if they want to make that independent of the primary Numeric Value field}. I would suggest adding the Range Value box and defaulting to the Numeric value variable when the Range Value is blank that way the programmer has full control in the event they actually need to control the color independent of the numeric value.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...