Using Color Picker Field to Dynamically Change the Form Background? Any ideas?

Quick question for anyone out there…

I am trying to use the new color picker field feature that is part of 6.x to allow the user to select a color. I am then attempting to create a new document that uses the color they picked as the background color of the form. I know of the field $PaperColor that allows you to modify the background color of the form, however this only allows you to use a number 1, 2, 3, etc to set the color.

Does anyone know of a way to use the color picker and then use the value that results ( a hex value) to set the background color of the form? I have been scratching my head over this for a while. Does anyone have any thoughts or ideas/

TIA!

Bryan Mackrell

Subject: Using Color Picker Field to Dynamically Change the Form Background? Any ideas?

I tried this from a new memo, and it’s properties dialog.

It seems that not only is there a $PaperColor text field, for the normal 256 colors, but there is a $PaperColorEx Rich Text Field, which I cannot see the contents of through properties.

So falling back to NotesPeek, I found the following…

So it looks like you need to create a Color CD record in that RTF. I don’t know if the new NotesRichText… objects will do that for you, but I suspect that you will need to use the API to create this field.

Subject: RE: Using Color Picker Field to Dynamically Change the Form Background? Any ideas?

So it looks like you need to create a Color CD >record in that RTF. I don’t know if the new >NotesRichText… objects will do that for you, >but I suspect that you will need to use the API >to create this field.

What is a Color CD and how would I go about making one?

Subject: RE: Using Color Picker Field to Dynamically Change the Form Background? Any ideas?

It is a composite data record (see my Rich Text 101 article on rich text for more info). You have no easy way to create what you want. You have a few choices. You could create some documents with the desired colors and copy their $PaperColorEx field, or you could use a third party product like our Midas Rich Text LSX or you could bag this idea and move on to more productive projects .