Shouldn't this script change the color of a field ?

if( this.rawValue == "1") { this.border.fill.color.value == "255,0,0"; }

smde,
I am not sure what you are trying to accomplish but I would discourage directly modifying the XML source.
Typically a fill colour change is performed in response to an event such as a failed validation. In this case you would put your script in the validation event for the applicable object.
Additionally, your script is not going to work because you are checking equality "==" rather than doing an assignment "=".
this.border.fill.color.value = "225,0,0,";
will change the fill colour to red.
Steve

Similar Messages

  • How can i change the color of a field in a table depence of a value

    Hi forum
          Is this possible to change the color of a row in a specific field of a table depends of the value of this field,,, for example if the value is equal or greather than 1.
    Thnks
    Josué Cruz

    Josue,
    Yes this is possible if you use the fillColor method. It requires R,G,B value of color.
    //Sample code which highlights cell2 in my table which has two rows.
    frm1.Table1.Row2.Cell2.fillColor = "120,120,120";
    // If you want highlight complete row.
    frm1.Table1.Row2.fillColor = "120,120,120";
    So now just apply an if loop which reads the input value as greater than 1 and use the code shown above.
    Chintan

  • Change The Color Of Fomula Field Based On Results

    I am using Crystal XI and I am familar with the Highliting Expert, but my question is can I have a formula field print red on the report based on a certain condition, blue on a different condition, etc. I am not sure how to code this if possible, so I will give an example:
    If Sales ($100) - Cost ($50) = Profit ($50) then print field red
    else if Sales ($80) - Cost ($40) = Profit ($40) then print field green
    else print field blue.
    I will need to add additional criteria to each IF statement which is why I am not using the Highliting Function, so my basic question is how to code the formula to have field field print different colors based on the field values.
    Any help would be geatly appreciated.
    Thanks Jim

    Hi Jim,
    Right click the field >> Format >> Font Tab.
    Find 'color' >> Click the little icon with a pencil and X-2 symbol to open the formula box.
    Place your formatting formula in the box:
    If @Sales - @Cost < 0 Then
         Formula = crRed
    ElseIf @Sales - @Cost >= 50 Then
         Formula = crGreen
    Else
         Formula = crBlue
    End If
    Full list of Color Constants are in the functions list of the Formula Editor.
    Art

  • How to change the color of same coloured sections of an image according to the colorpicker..?

    Hi.. How r u all..?
    I'm doing a small program to change the color of those sections of an image which are having the same color, according to the color selected from the colorpicker..
    Say we have selected a color from the colorpicker, and then the mouseclick event on the image changes the color of those parts in the image which are having the same color as the clicked portion (or pixel) to the selected color.. If we've selected FF0000 from the colorpicker, then clicked on 3300CC coloured pixel in the image. This should change the color of all the 3300CC coloured pixels in the image..
    I've a colorpicker [colpickr] and a movieclip [mc] of the image on the stage. I created a bitmap of that same same image (imag1) using code. Selecting the color from the colorpicker and a mouse click on the movieclip (here I used getPixel) will change that color in the bitmap to the selected color (with setPixel). So here I've two images; one is a movieclip (inorder to add listener for click event) and one is a bitmap (inorder to set the property setPixel). But I need only a single image.
    Please help me regarding this.. Given below is my (horrible) code..
    import flash.events.MouseEvent;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.net.URLRequest;
    import flash.display.Loader;
    var c = 0;
    var myBitmapData:BitmapData;
    var bm:Bitmap;
    colpickr.selectedColor = 0xffffff;
    var preLoader;
    var urlReq;
    var preloader_img:MovieClip;
    preLoader =new Loader();
    preLoader.unloadAndStop();
    urlReq = new URLRequest("imag1.jpg"); // i've selected the same image as that of movieclip mc
    preLoader.load(urlReq);
    preLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,preLoaderComplete);
    //creates a bitmap image of mc..
    function preLoaderComplete(loadEvent:Event) {
        myBitmapData = new BitmapData(mc.width,mc.height);
        myBitmapData.draw(mc);
        bm = new Bitmap(myBitmapData);
        addChild(bm);
        bm.width = mc.width;
        bm.height = mc.height;
    mc.addEventListener(MouseEvent.CLICK, _onMouseClick);
    //gets the color of mc and sets the color to bitmap
    function _onMouseClick(event:MouseEvent):void {
        var myColor:uint = myBitmapData.getPixel(mc.mouseX,mc.mouseY);
        c = myColor.toString(16);
        for (var i=0; i<bm.width; i++) {
            for (var j=0; j<bm.height; j++) {
                if (myBitmapData.getPixel(i,j).toString(16) == c) {
                    myBitmapData.setPixel(i,j,colpickr.selectedColor);

    try this:
    import flash.events.MouseEvent;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.net.URLRequest;
    import flash.display.Loader;
    var c=0;
    var myBitmapData:BitmapData;
    var bm:Bitmap;
    colpickr.selectedColor=0xffffff;
    var preLoader;
    var urlReq;
    var preloader_img:MovieClip;
    preLoader =new Loader();
    preLoader.unloadAndStop();
    urlReq=new URLRequest("z_bitmaps/image1.jpg");// i've selected the same image as that of movieclip mc
    preLoader.load(urlReq);
    preLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,preLoaderComplete);
    //creates a bitmap image of mc..;
    function preLoaderComplete(loadEvent:Event) {
        bm = Bitmap(loadEvent.target.loader.content);
        addChild(bm);
    stage.addEventListener(MouseEvent.CLICK, f);
    function f(e:MouseEvent):void{
        if(bm.hitTestPoint(mouseX,mouseY) && !colpickr.hitTestPoint(mouseX,mouseY)){
            _onMouseClick(e);
    //gets the color of mc and sets the color to bitmap
    function _onMouseClick(event:MouseEvent):void {
        c=bm.bitmapData.getPixel(bm.mouseX,bm.mouseY);
        for (var i=0; i<bm.width; i++) {
            for (var j=0; j<bm.height; j++) {
                if (bm.bitmapData.getPixel(i,j)==c) {
                    bm.bitmapData.setPixel(i,j,colpickr.selectedColor);

  • Where do I change the color of this text in the blog page?

    I'm trying to add a blog page to my non-template iWeb site. On the Main Page, I'm unable to change the color of the font in the hyperlinks, where the default reads "Day of Longboarding" and "Read more…". I don't know what I might be overlooking. Any pointers? Thanks…

    That's not something iWeb has a menu item for.  However with the proper javacode you can change a lot about the navbar. This deoo page describes how: Change Navbar Text and Background Color.
    OT

  • How can I change the color in this "pieces"

    Hello guys, I'm new in the forum and I'm searching for help.
    I'm using a free template that I downloaded from
    the internet but I'm having a small problem.
    When I put the logo that I want use in the template, the color is not the original one,
    after some minutes trying to discover how I could change it to the original version of the logo, I found an option on "fill" with a color that I could change..
    the problem is that when I change the color, all the logo changes in the same time, so I created 2 logos.. one of then only with the dark color and the other with the red color
    so with this method I could change both colors on this "fill" option and all would be okai.
    the problem is that both of the logos are changing in the same time.
    I need to change the X to RED and the Moto to Black
    Another problem that I have is : the little pieces of the logo that come all togheter, they are all black.. and i need to change it to the right color.
    cause the text are in one color and the pieces are all black.

    I did it, but i saw that Fill effect is a little "Shadow" behing the text... just for a small white line... I'm almost done with this intro, now I'm trying to find out how can I change the color from the X and MOTO
    cause when I change the color, both changes, and this can't happen.
    I need the X red and the Moto dark...
    I made 2 compositions ... one with just the X  X red.. and another with just Moto in dark color... but I don't know how to put this 2 compositions in 1 composition.

  • How do I change the colors of this image?

    I want to change the color scheme of this image, not just re-color it one color.  I have the original file, this is just the shutterstock preview image. I'm a beginner with Illustrator.
    Any tips would be much appreciated! Thanks

    Select it, and click the Recolor Artwork button in the Options Bar.

  • How can I change the colors of this image?

    I want to change the color scheme of this image, not just re-color it one color.  I have the original file, this is just the shutterstock preview image.
    Any tips would be much appreciated! Thanks

    colored image like this one, the Hue/Saturation function can be used to alter specific ranges of colors.  For example, altering the Hue and Saturation of Cyans and Yellows...
    -Noel

  • What would be the best way to change the color of part of this image? (image attached)

    I am on XP using PS CS4.
    Please see the photograph below. I would like to change the color of the shirt/apron of this lady & I was wondering what the best way is to do that. I know if I try replace color, the white bowls change color as well. In the past I have isolated parts of images using paths, but I wanted to know if that was the most efficient way. Maybe masking is the answer. I just wanted to hear from the pros
    Thank you.

    You're welcome!
    Refine Edge button is in the options bar when the QST is active.
    Refine Mask should be available whenever a mask is targeted.

  • TS3999 When using iCloud Calendar, I am unable to change the color of my work calendar. I have successfully followed the instructions to reset the colors of other calendars as desired. However, this one calendar always defaults to purple.  Help!

    When using iCloud Calendar, I am unable to change the color of my work calendar. I have successfully followed the instructions to reset the colors of other calendars as desired. However, this one calendar always defaults to purple.  Help!

    File>New Calendar to create a new calendar (Groups are for grouping calendars and I should ignore them). When you've created the calendar, control-click on it in the sidebar and choose 'Get Info' There you can select a colour. You can have as many calendars as you like. When you create a new event you can select the calendar it belongs to, and hence the colour it has.

  • I can't change the color of this vectorimage without changing the vectorimage

    Hello,
    I have a strange problem. I designed this logo but it is impossible to change the color http://www.acmeurope.com/logocolor.ai . The strokes change then completely. And when undoing, the original form is lost.
    Any ideas?
    Thanks!
    Best regards,
    Dirk

    Hi Dirk--no idea either. Deleting the copy below the artboard didn't do it for me. Strange. But I wouldn't have built it this way either, not understanding how it was built in the first place.
    I redrew it with round butt caps on another layer. It is stable.
    Take care, Mike

  • Can I cycle through and change the color overlay of certain layers by name using script?

    Can I cycle through and change the color overlay of certain layers by name using script?

    Sure. Ask in the scripting forum and refer to the scripting docs.
    Mylenium

  • Why cant i change the color on this brush?

    I downloaded some art brushes but i cant change the color on them like on the standard cs3 brushes.
    Anybody any idea?

    Tints.
    (Or you could read a little about what the other settings do and don't do to color... there should be a tip dialog right within the paint brush options dialog, or you can consult the help files.)

  • Tabular Forms - how to change the color of text when the field is disabled

    Hi,
    I have a tabular form and some of it's columns are disabled showing text in grey color...
    is there a way to change the color to black and bold the text...?
    thanks

    Okay, i've taken a look at your example.
    The column formatting does not work on the input fields. The help on the item says that it generates a span with a style attribute. This would work for a display field, not for an input field.
    Css like i've written should be in the style tags, put up in the header section of the page (page -> edit -> header region).
    You've already put script tags there, the style tags go there aswell. You shouldn't even need to put your script tags in the header region. Just put your code up in the javascript functions region (without the script tags).
    However, i tested in firefox and here color works on an input field, changing the font color. In IE it does not do this. Cross browser implementations and such, not much to do about it here. See http://stackoverflow.com/questions/602070/changing-font-colour-in-textboxes-in-ie-which-are-disabled.
    I did notice that you build your form with a bunch of input fields, which you disable through javascript in the footer of the region. Then on submit, you set the disabled to false again for all those fields! If you want those fields to always be submitted to the server, why wouldn't you use the readonly attribute? Readonly fields are always submitted, and can't be edited by the user. Plus, readonly fields CAN be styled however you want! You can get rid of the javascript code in your header then.
    Even the javascript in the footer is not necessary. If you just add 'readonly="true"' (without single quotes) to the element attributes of your items (edit column -> column attributes region) = no javascript at all (less maintenance).

  • Change the color of selecteditem in a LIST FLEX

    i WANT TO CHANGE THE COLOR OF SELECTEDITEM IN A LIST.  WHEN EVER USER DOUBLE CLICK THE ITEM IT SHOULD CHANGE THE COLOR...
      THIS IS MY LIST WITH DOUBLE CLICK EVENT...PLEASE HELP.....THIS SEEMED SO SIMPLE BUT I ALREADY SPENT FEW HOURS..
    HELP WILL BE APPRECIATED. THANKS
    <s:List id="shopslist1" left="0" right="0" top="57" bottom="0"
                initialize="shopslist1.dataProvider=actions" labelField="details" color="Red"   doubleClick="shopslist1_doubleClickHandler(event)">      
        </s:List>
    protected function shopslist1_doubleClickHandler(event:MouseEvent):void
                    shopslist1.selectedItem. ?????????

    Hello,
    Please see following code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- dpcontrols\spark\SparkListSimpleStyles.mxml -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx">
    <s:layout>
    <s:VerticalLayout/>
    </s:layout>
    <fx:Script>
    <![CDATA[
    protected function myList_doubleClickHandler(event:MouseEvent):void
    myList.setStyle("selectionColor" ,"#CC6600");
    ]]>
    </fx:Script>
    <s:List id="myList"
    alternatingItemColors="[#66FFFF, #33CCCC]"
        doubleClick="myList_doubleClickHandler(event)">
    <s:dataProvider>
    <mx:ArrayCollection>
    <fx:String>Flex</fx:String>
    <fx:String>Flash Builder</fx:String>
    <fx:String>Flash</fx:String>
    <fx:String>Director</fx:String>
    <fx:String>Dreamweaver</fx:String>
    <fx:String>ColdFusion</fx:String>
    </mx:ArrayCollection>
    </s:dataProvider>
    </s:List>
    </s:Application>
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

Maybe you are looking for