Dynamically set the icon in a LinkButton

I use several controls link as navigation devices button in my application.  When the LinkButton are created they are given all the four properties of the icon as follows:

upIcon= "@Embed(source='images/Off_1.gif')"" "

" icon = ' @Embed(source='images/Off_1.gif') "

overIcon= "

@Embed(source='images/Over_1.gif') "

downIcon= "@Embed (source =" images/_1.gifsalt ' ")" " "

The second LinkButton would have the same properties as stated except that it would have it's own set of GIF.  Because these are navigation buttons in my application I want to be able to click on a LinkButton and have is downIcon GIF became the icon GIF.  In this way, it seems that the button has slept selected and gives the end user a visual indication of where they are in the application.

Problem is how to set the State of the icon of a LinkButton and make it show?  I tried this CODE but it did not work...  It does not generate an error... is there just no visual effect.

LinkButton_1_ID. setStyle ('icon', 'images/Sel_1.gif');

So if you have ideas on how to change the icon on a LinkButton please let me know.  Thank you in advance for your help!

Have an ordinary day...

KomputerMan ~ |  :-)

You are probably better off just using a Button with custom skins. But if you do want to swap out the icon, you'll need to embed the asset as a Class:


Tags: Flex

Similar Questions

  • Dynamically set the Station process model

    I noticed in an existing position, to dynamically set the active process template, you use the Engine.StationOptions.StationModelSequenceFilePath property. (Search for "How do I dynamically (at runtime) the models?").

    But where do you put the statement that sets it?

    Thank you

    Oh yes I forgot to say in my last post

    You can make a file of sequence requires a specific process template.  So that no matter what the model of the station is on the sequence of file always use the designated model provide you.

    With the sequence file that requires that the new process model open go to Edition > properties file in sequence.  Under the Advanced tab, under model Options, select require a specific model.  You will then see a box of template file.  Navigate to your new template and select it.  Click OK to exit.

    Now, whenever this sequence file is opened, it will use this process template regardless of what is the model of the station.

    Hope this helps,

  • Unable to set the icon of my application

    Hello everyone, I tried to create my icon of the application according to this link with Blackberry Java plug-in for Eclipse. But I can't find "use as the Application icon" when I right click my picture file. Can someone help me put the icon for my application? Thank you.

    the article refers to the JDE, which is the old environment.
    in eclipse, you set the icon in your application descriptor file.

  • How to dynamically set the height and width of the image?

    I'm trying to dynamically set the size of an image of "spacer", but this doesn't seem to work.

    "< img src ="Images/SpacerYellow.gif"width ="5"height =" < cfoutput query = "Img" > #Img.Jan # < / cfoutput > "/ >

    When I insert the source of the page and the view, it is the HTML < img src = "images/SpacerYellow.gif" width = "5" height = "745014" / > why so the stil teeny tiny image? "

    A better question would be, why are you trying to display an image of space which is more than 745 000 pixels high? The HTML code looks OK, so you may be panicking the browser.

    From the point of view best practices, if you only want to display a value in the first row of a query, you can reference using the #MyQueryName.myColumn #. You need not include the query within the tag.

  • dynamically set the role name

    Hello

    I set 4 roles in the application. In the navigation of workflow, I created a notification. How can I dynamically set the name property of role of the Notification message so that as soon as the order is delivered to this notification, all users in this role Gets the notification message?

    Thank you.

    Hello

    Define an attribute that contains the value of one of the four defined roles. Then create an activity (with a specific function) who will choose the role and assigning to the attribute.

    In the notification, give the value of the performer or performing as the name of the attribute.

    This will solve your purpose.

    Kind regards
    Kumar.

  • How to outsource the JNDI name (dynamically set the JNDI name)

    Hello

    In the adapters such as ftp, database, must specify the jndi name. This binds the adapter to a particular jndi name. It's certainly better that connect the adapter directly to the physical resource, I was wondering if it is possible to have still more flexibililty-setting the jndi name dynamically.

    Basically my requirement is to develop a web service that reads a file from a FTP location. I know that I can outsource the file name and directory, but I wonder how to dynamically set the ftp location.

    http://Darwin-it.blogspot.com/2008/03/configuration-of-FTP-synchronous-get.html gives the answer if I want to set the host name, portname, user id and password.

    But I want to configure the adapter got FTP and then use this JNDI name in my service. Is this possible... I am using SOA 10.1.3.3

    Kind regards
    Amit

    I've sent.

    -Rigault.

  • Dynamically set the height of the rectangle

    I need to define a rectangle of height according to the items it contains dynamically. I need the container to float its size accordingly.

    For example:

    'Apple' class needs an extra 10 pixels height

    "Pear" class needs an extra height of 10 pixels

    "Peach" class needs an extra 10 pixels height

    So... i f I switch Apple, pear, fishing all on... I have to add 30 pixels to the height of the 'rectBasket'.


    Goal: cart adjusts its height at each rocker. In the rocker by each fruit:

    If (SYM $("..) (Is Apple") (": visible ")) {}

    SYM $(".) Apple"). Hide();

    var htApple = 0;

    } else {}

    SYM $(".) Apple"). Show();

    var htApple = 10;

    }


    var htBasket = htApple + htPear + htPeach;

    Is it important that PEAR and fishery variables have been set into a different scale?

    sym.getComposition () .getStage ().getSymbol("GV-4Cases").$("rectBasket").css ({"height": "htBasket"});

    Place immediately after, shouldn't this resizing the basket?

    No luck.

    I'm a 'high functioning designer' with respect to the code. Can someone correct me with a simple and clear description or give a better method (direct, easy) to dynamically change the height of the "rectBasket"?

    Thank you very much! Grace

    I did it. I forced myself to understand the variables (you can hear me, designers).

    Goal: float a rectangle size, whose elements are oriented, such as when items are turned on, the rectangle grows (if the elements do not overlap each other). An accordion of sorts. Each of the elements is relative to the upper or down, so when the rectangle increases, the elements are drawn out.

    BTW, thanks to resdesign which is always useful to read. His other posts have helped tinkering me together an answer to my specific case. THX!

    Step 1:

    Declare the variable in compositionReady

    Declare variables as elements call later

    var AppleHigh;

    var PearHigh;

    var PeachHigh;

    var ComboHigh;

    Step 2:

    In the code of the rocker of each element (switching power of the Apple, pear, fishing,..), declare the variables in the main code

    var AppleHigh;

    var PearHigh;

    var PeachHigh;

    var ComboHigh;

    Step 3:

    Below it, create a toggle of the value of the variable

    for the class of Apple

    If (SYM $("..) (Is Apple") (": visible ")) {}

    var AppleHigh = 55;

    } else {}

    var AppleHigh = 0;

    }

    for the Pear class

    If (SYM $("..) (Is pear") (": visible ")) {}

    var PearHigh = 55;

    } else {}

    var PearHigh = 0;

    }

    for the Peach class

    If (SYM $("..) (Is Peach') (": visible")) {}

    var PeachHigh = 30;

    } else {}

    var PeachHigh = 0;

    }

    Step 4:

    Below it, declare and set the variable that matches the new height

    var comboHigh is 175 + AppleHigh + PearHigh + PeachHigh;.

    Alert (comboHigh) / / / uncomment to test the value in the pop up window

    NOTE: 175 is the height of the initial base rectangle

    Update: I use it instead

    Declared ' var boxStartSize; "in both: compositionReady and above the rocker in the code of the item

    In the code of the item...

    var boxStartSize = sym.getComposition () .getStage ().getSymbol("GV-4Cases").$("CASE-master-box").height ();

    Gets the entire value of the height

    var comboHigh = boxStartSize + bottomlyHigh + pronounHigh + pseudosHigh + personalsHigh;

    It is therefore only once that I copy this structure all over in different places, I didn't go back to handcode the height of the original rectangle.

    Step 5:

    The score allows you to change the height of the box

    ENTER IN THE HEIGHT BOX.

    sym.getComposition () .getStage ().getSymbol("GV-4Cases").$("CASE-master-box").css ({"height": comboHigh});

    IMP: no quotes on the value of the variable.

    Quotes on the value of the variable were a big obstacle for me. It took me a while to understand this detail. Ugh.

    Step 6:

    Create the same for each rocker of the element, then the height is re-evaluated whenever you change a toggle.

    Step 7:

    Assign/check the relative angle.

    Check on what corner your items received! Select the item, look for the 4 tiny squares next to Global applied icon in the properties panel. Choose a corner. Where the element is fixed in relation to a parent.

    Make sure that the element has a parent via dragging on a div or in a rectangle structure structure.

    Example could look like this:

    RectangleMaster

    > RectangleApple

    > Apple.svg

    > RectangleFruitChoice

    > RectanglePear

    > Pear.svg

    > RectanglePeach

    > Peach.svg

    Here, in this example, RectangleMaster is the parent of RectangleApple and RectangleFruitChoice.  This means that I did slide the rectangles on another rectangle to build the structure. Select the element and choose a corner of the icon of small places accordingly.

    Similarly, RectangleFruitChoice is the parent of RectanglePear and RectanglePeach.

    In this way, you can build a complex and dynamic structure.

    Best of luck to you all, code-ambitious designers out there! /GB

  • How can I set the icon of the application?

    does anyone know why is not defined my application icon? I tried with a png and gif image and set the properties of recources of my project - icon of the application to this file.  I use eclipse with the backberry plugin.

    I found someone who said it should be 80 x 80 and that fixed it. Thank you!

  • Set the icon of the app for JDE 4.2.1.41

    Hello

    How to set the application icon in JDE 4.2.1.41? We already have an option in JDE 4.7.0.41 (project-> properties-> resources-> files of icons), but did not find such an option in JDE 4.2.1.41.  Please help me.

    Thank you

    -DK

    I was worked. ! I just added the following in the *.jdp file manually.

    [Icons
    ..\TestBB\src\com\test\img\test.png
    ]
    

    Thank you

    -DK

  • How to dynamically set the filter IR APEX of the value of a radio button column?

    Hello

    I built a simple APEX 4.2 IR report that includes column, namely "Source_Data" and a separate user to input radio button namly "P33_SOURCE_DATA" with two possible values in 'X' or 'Y '.

    I would like the report filter source_data = 'X' or source_data = "Y" is applied, after each time the user clicks on the radio button P33_SOURCE_DATA. "

    So my question is, how to set the value of the IR filter using the value of P33_SOURCE_DATA to the dynamic action and javascript?

    Thanks in advance.

    Concerning

    Susanna

    In this case, you can pull an onchange dynamic action on the radio, or at the click of a button.

    This dynamic action update your IR region

    And your IR region would have an appropriate where clause, with "Page to go" set on your radio.

  • Dynamically set the order of the symbols on the stage?

    Is it possible to change the order of the symbols on the stage dynamically via the coding?

    While clicking on a button would be a symbol on the back?

    The reason why I ask is because even if one of my symbols is set to invisible, it still hinders my ability to click on the buttons that are technically below.

    Any help would be appreciated.

    Thank you

    You can use the z-index with this basic format:

    SYM. $('NomSymbole') .css ({' z-index': 100 '});

  • Dynamically set the width of the itemRenderer content

    Hey all,.

    Thank you for taking the time to look at it. what I try to do is simple, I think, but escape. I have a datagrid, the value of width of 100%. I have a total of 7 columns, the first 2 are fixed width. 5 remaining columns (and their content, which is important), should dynamically size to occupy the remaining space. I use comboboxes in these columns and can't seem to set the width of these comboboxes, based on the width of the column, in which they appear. I tried placing it just at 100%, but which causes a scrolltrack to appear and combobox is hidden behind the scrolltrack.

    help is greatly appreciated

    seems okay - it's just {width}, no reference to the not required column. its okay?

  • BRANDING: Dynamically change the icon of the Application and App images

    I want to be able to my trade mark application such that the icon of the application depends on the Registrant and/or some download settings - and thus limit the build that I maintain in a single generation.

    For example, someone downloads the application of a link to company X, so that when it is installed on their smartphone there the icon title and app for company X.  The icon and title vary according to the download (perhaps through the query string values).

    Is this even possible, and if not is - can anyone think of another approach?  An idea I had was to have the user to enter a record value which would cause then a different resource file take effect, but do not know how is there to take to do this.

    Take a look at 'net.rim.blackberry.api.homescreen.HomeScreen', he could not do what you want, but it can change the icons and the names of your application.

  • How to set the icons to display on the account of a user only

    original title: too many icons

    I wonder why I download on my account of the programs add the icon to the other screens two users?  Conversely, when I removed the icons on the screen of my daughter (not planned for it) the icons have been removed from all screens. What is the trick to get MY downloads on only MY account? Thank you, Jenny

    In addition to commentary of Entegy I must add that when you install a program, you will find an option that if the program that you install will be available for the current user only or for all users. Select only the current user to stop this problem.

  • Dynamically set the Destination URL

    Hello

    I have to set Destination URL dynamically.

    return.setDestination("OA.jsp?page=/oracle/apps/pa/project/webui/HomePG");

    If (PageContext.GetParameter ("Return")! = null)
    {
    But when I clk on btn Im nt can access the home page.
    }

    If I use pagecontext. SetforwardURL() for the back than the URL of the page button cannot be changed is that the same page url rather than the URL of the home page, but the page navigates to the home page.

    Please help me...

    Thank you
    Nani :)

    Hello

    I created a button bean progrmatically.

    and put the url of destination dynamically by using this code... its works very well

    Button OAButtonBean = (OAButtonBean) createWebBean (pageContext, OAWebBeanConstants.BUTTON_BEAN, null, 'BUTTON');
    button.setText ("Test button");
    button.setDestination("OA.jsp?page=/oracle/apps/pa/projupdate/webui/ProjectListPG");
    webBean.addIndexedChild (button);

    Thank you
    Gerard

Maybe you are looking for