Set Color dynamically to Infopath form controls.

J

Jai

Hello All,

I have created a toolbar having buttons with a list a color, as user doesn't
wants to select color from the default Formattin toolbar.

On the click of the new toolbar button where there is already a color
defined, the new text should be displayed in the color selected. The user can
start typing from any where in the Rich TextBox and the new text could be
displayed in the new color selected....

Is there a solution where i can dynamically set the Color on the selection
of the toolbar button to all the Rich Text Box....?????

Waiting for an response ........


Thanks in Advance.

Jaideep.
 
B

Ben Walters

Hey Jai
This sounds like a very strange requirement, I have managed to have text in
a field update to red to show where data has been chagned on a form.
Basically the premis was to add an 'Updated' attribute to each field on the
form. I would then use conditional formatting to check the value of the
attribute and set the text colour accordingly.

You could potentially do the same thing however your would have to set a
conditional formatting clause for each colour you wanted to use.

so if you have an XML structure that looks like this

<root>
<richtext Colour=""></richtext>
</root>

when the user slects the colour from a button you update the Colour
attribute for the text field to a value "Red", "Green","Pink" etc... you
then use conditional formatting rules to apply the colour.
It may be a little tedious to setup depending on the size of your form but
should work.

let me know how this goes

Cheers
Ben
 
Top