Is it possible to dynamically set the background color of a textbox?

4
In one of our apps we import PDf and extract metadata from the pdf-file. One of these metadata items is the standardised code of the supporting color used in the Pdf. We show this code on a form in a textbox and we want to change the background color of this textbox depending on the value of the colorcode attribute. This colorcode also has corresponding CMYK and/or HEX values available if necessary.
asked
3 answers
5

A small widget could easily do this. I might have time later this week. Is the textbox supposed to have any content or does it just need a size + background-color attribute ?

Edit: It's nearly done, I'll upload it to the AppStore tomorrow and you can let me know if it needs to do anything else.

Edit2: The widget is now available at Color Textbox.

answered
1

Depending on the number of colorcodes you actualy use, create an Enum with the values of the colorcode atribute and an image in the correct color

answered
1

I guess you need a custom widget for that.

answered