5 Replies Latest reply on Jan 24, 2013 8:39 AM by raybaudi

    Using script to change the color of the box.

    thomaslee

      Title

      Using script to change the color of the box.

      Post

           script can change the text by "textcolor", but can it change the color of box also?

        • 1. Re: Using script to change the color of the box.
          symbister
           I'm guessing that you mean a field boundary - sounds like you might like to consider conditional formatting (In Layout Mode go Format>Conditional) whereby you can change font colour, background etc, depending on the value of that field, or another field on your layout (or indeed pretty much any related field anywhere in your solution) or a formula using a number of fields
          • 2. Re: Using script to change the color of the box.
            thomaslee

                 yes, i mean to change the field color, but if i use the conditional formatting, i can't see any color in IE or firefox, so i want to use script to change it.

            • 3. Re: Using script to change the color of the box.
              Sorbsbuster

                   Conditional formatting is not supported in IWP.

                   You could make the text box clear, and have another box behind it - a container field.  The script can set the container field to a colour specified in another global container field in your 'preferences' table, for example.

              • 4. Re: Using script to change the color of the box.
                philmodjunk

                     To fill a container field with color:

                     Enter layout mode.

                     Draw a rectangle on the layout. Select the desired fill color for the rectangle. Select either a zero width border or a border with the same color as your fill color.

                     Copy the rectangle to your clipboard

                     Paste the rectangle into your container field.

                     Used data formatting on your container field under the data field to specify enlarge or reduce and clear the "maintain proportions" check box.

                • 5. Re: Using script to change the color of the box.
                  raybaudi

                        

                       1) Enter layout mode.

                       2) Draw a rectangle on the layout. Select the desired fill color for the rectangle. Select either a zero width border or a border with the same color as your fill color.

                       3) Copy the rectangle to your clipboard

                  4) Enter Browse Mode

                       5) Paste the rectangle into your container field.