You're lucky you wanted red. Red is the only color you can use other than black. In your initialize function add the following line. Adjust the item_id to meet your needs.
I can't get it to work still. The Item ID is "Exmp."
function DoSetDocNumberFn(dialog, oDlg)
var oRslt = dialog.store();
var strExample = oRslt["LPfx"];
It still shows up as black text.
Den er Grei
You have the line right but as I stated in my answer, the code must be added to the initialize function of the dialog.
initialize: function (dialog)
There might be other code in initialize as well. My example is just the simplest case.
Does anyone know why this is still not working? I tried the following, which is differnet from yesterday. It loads but there is no change in color.
1) setForeColorRed() takes a string as a parameter, not an object and will only work when it is added to the initialize function of the dialog . The string is the item id of the element you want to be red. Please see my example higher up in the thread. If you don't have an initialize function, you need to create one.
2) It would be helpful if you posted the code for the entire dialog. With dialogs, it too hard to diagnose problems from snippets.
Oh, I see. Thx for your help. Next time I will post the entire dialog.