Change the skin components at run time

I have a button component that has a single image and a few color filters to change the colors for the different States and I need a way to change the image source when running according to some data. Is this possible? If not, I don't have to really do a custom just component to do this? Because that seems like way too much work for something so simple.

This custom component that is "the way to a lot of work" probably would have taken much time to create as you spent to create this thread.

package
{
     import mx.binding.utils.BindingUtils;

     import spark.components.Button;
     import spark.components.Image;

     public class MyButton extends Button
     {
          public function MyButton()
          {
               super();
          }

          [SkinPart]
          public var imageDisplay:Image;

          [Bindable]
          public var icon:Object;

          override protected function partAdded(partName:String, instance:Object):void
          {
               super.partAdded(partName, instance);

               if(instance == this.imageDisplay)
               {
                    BindingUtils.bindProperty(this.imageDisplay, "source", this, "icon");
               }
          }
     }
}

Now just assign 'imageDisplay' to the id of the image in your skin and your done.

It wasn't so much work now, was it?

Tags: Flex

Similar Questions

  • Requirements for the Labview 8.6 run-time engine

    Hello

    are there system requirements for the LabVIEW 8.6 run-time engine? for example, same system requirements for LabVIEW 8.6? Internet Explorer 5 is perfect? or Internet Explorer version 6.0 or later is good? It works for Firefox on a Linux Athena mechine?

    Thank you

    Cynitha

    The system requirements can be found in the Release Notes. Pages 2 and 3 indicate the specific requirements for the Run-Time Engine by platform.

  • My laptop goes to "standby mode" much too quickly (Windows 7). How can I change the settings to extend this time?

    original title: sleep mode settings

    My laptop goes to "standby mode" much too quickly (Windows 7). How can I change the settings to extend this time?

    Click on start > Type, sleep > change when the computer sleeps

  • In the report previewer of run time, when you click on file-> generate file->

    In the report previewer of run time, when you click on file-> generate file-> RTF, PDF, etc...

    I want to disable this option in the report, pl suggest

    Kind regards

    Hello
    I guess you are using reports 6i, so in this case, you must pass the following parameter when you run the report
    for example
    DISABLEFILE = YES

    Best regards, RZ

  • How can I change the skin existing module (RH9)?

    I have RH9. I have inherited a project. The skin for a module (Radiant) does not match the skin to the other modules in the project (for example hospital help).

    Delete2.jpg

    I tried to change the skin, but it made no difference. I then copied the! SkinSubFolder! Hospital to Radiant. It made no difference.

    I don't know what to do to make them match.

    Any help is greatly appreciated.

    Vicki

    Take a look at the video below the link for an example of what I expect to see.

    Click here to see

    See you soon... Rick

  • Change the default value for the field selection at run time

    I would like to know how can I keep persistent information in Sib. My problem is I want to change the default value of the choice field when running so that when the user starts the application again, it can retrieve the new default value.

    store values can be done using the persistence framework.
    See Persistable, PersistantObject and PersistantStore in the API.

    You can call setSelectedIndex on an objectchoicefield.

  • Manual change of graphic data at run time

    Hello.

    And thanks in advance.

    Im trying to put on a mask limit on a chart in a similar way to 'Set' tab on the 'configure mask and limit the tests' expresses labview vi 2012.

    Does anyone know of a way to move the data points on a chart xy running directly?

    For example: say a plot of frequency xy with 10 points from 100 Hz to 1000 Hz and I want to change the value set to 200 Hz.

    I would like to use a graph xy controller, point my pointer of the mouse at 200 Hz and Marc data point sandbox to my desired value.

    Here is a screenshot of the above express vi. In this document, you can draw the dots on white graphics wherever you want in

    the graph.

    It would be good that I could do the same thing on a normal xy chart

    Any help will be appreciated

    Thanks in advance

    Chuck

    How about this? The downside is having to create a finite number of cursors for your chart first.

    1 create the initial track XY data. To scroll the corresponding sliders and set their positions.

    2 allow dragging of sliders. The time-out period of the structure of the event, replot the "new route" between the positions of the cursor.

    3. the pressing update, set the data of the main plot equal to the position of the sliders.

    LV2012 example of a seal.

  • How to change the skin

    The skin looks to 'woodwork' I want to change the colors.

    Then try the "hamburger" + Add on (or Alt + T + A)

  • Improved LabVIEW 8 to 2013 and VI asked now to find the installation package for Run-Time Engine 7.0

    I recently installed LabVIEW 2013 on a computer (running Windows XP 32-bit).  The machine has also of LabVIEW 8 is installed, which is what I used before the upgrade.  I opened a VI has been created in LV8 and then saved it and all its subVIs in LV2013.  Now when I open the VI in LV2013 and try to run it, a window opens asking me to find the installation package 'lvruntimeeng.msi' for LabVIEW Run-Time Engine 7.0.  If I cancel this dialog box, and the subsequent message, indicating that the installion files were not, the VI appears (at least of the initial inspection) to function normally.

    I have closed LabVIEW, downloaded Run-Time Engine 7.0 on the site of NOR and tried to install it, but I received a message saying that it is already installed (as I had suspected).  How can I determine what part of the VI and/or its subVIs tries to make use of Run-Time Engine 7.0?  If not, how can I get LabVIEW to use instead the Run-Time Engine 2013 that was installed when I upgraded to LabVIEW 2013?

    Bob_Schor wrote:

    You run your VI of a project?  If so, you can watch the dependencies and get an idea of what live "in charge", you might have.  There may be "something old" in your code in LabVIEW 8, which was replaced in 2013, but ' plane still around "-If you can identify it, you can probably replace it with its"more modern"equivalent

    If you do not have the VI in a project, you can simply open LabVIEW, create a blank project and add your first level VI.  If all of your relevant screws are in a single folder, add the entire folder.  Now look in the dependencies.

    BS

    Yes, I run the VI from within a project of LV.  After some more research in the knowledge base OR I could solve the problem by using the following procedure:

    1. use the measurement and Automation Explorer to uninstall Run-Time Engine 7.0

    2. restart the PC

    3. open the project, close the project by choosing "save all".

    4. restart the PC

    5 reinstall the Run-Time Engine 7.0 using a file downloaded from ni.com

    6. restart the PC

    7. open the project, close the project by choosing "save all".

    8. open the project and run the VI.  No more messages on LabVIEW, trying to find the Run-Time Engine 7.0.

  • Deactivation of the Palette tools at run time

    I would use + on a control through one event structure at run time, but it's the shortcut that shows the tool palette.  Is there a way to delete the shortcut so that the tool palette only occurs at run time?  I already use "Run-time shortcut menu/Disable" setting on the control, as well as the generic "front panel window: allow the Run-time popup = F ' property.

    Build your application in a .exe and that you do not get the toolset on a right click.

  • References: Different Aspect in the development system and Run Time System

    I noticed a difference the appearance of references in system development and run time system.  He seems to have no effect in the executable version, but, out of curiosity, anyone has an explanation?

    Development system

    Run time system

    Jean-Marc

    TST wrote:

    When LabVIEW generates an executable file, it deletes the parts which are not necessary the screw (like the comics, or FPs of screws that will not open). I guess that's an extension of the one where the icon is not copied on. Another option is that RTE simply lack the code necessary to display this specific to this.

    In any case, I would say that this is a bug, even if it is minor.

    I don't think it's a bug, the summary of references to a CTL file, which is not present in the RTE, I think that LabVIEW disconnected from the reference shape the typedef and saves only the required properties.

    Tone

  • How to change the unit of measure by time of Bing

    By the time Bing, how do you change the unit of measure for Fahrenheit to Celsius.

    By the time Bing, how do you change the unit of measure for Fahrenheit to Celsius.

    Hello

    Right-click anywhere in the weather app and select change to Celsius in the background options bar.

    Concerning

  • What should I do to change the skin tones?

    I have a picture of me created by fiverr and want to achieve a change of tone of flesh. What is the best training for me to do with Photoshop?

    1. at this stage, according to your experience of Photoshop, I suggest that you find a picture with a flesh tone that you like, similar to yours that you want to replicate to your image.

    2. download and open it in Photoshop.

    3. click on a region of the cheek, not the climax, with the color sampler tool.

    4. in the history panel, note the RGB values and write them.

    5 0pen your own image and once more, in the cheek area click with the color sampler tool.

    6. choose Image > adjustments > curves and click with the tool sampling of color on the brand that you have already done with the color sampler tool, this time while maintaining the command and shift keys.

    7. switch to the R channel in curves and you'll see a marker on the curve. Use of the information as your guide Panel, change the value to match the r-value of your image reference (step 4) using up and down arrows on the keyboard. (The new value will appear alongside the start value for each channel).

    8 do the same (step 7) with the curves of G and B.

    9. adjust the curves to your personal taste, and then click OK.

  • Catch22, how to change the settings for VirtualCenter, running as a virtual machine

    I'm running as a virtual machine under ESX 3.5 VirtualCenter. I want to change the setting of this virtual machine, but of course, the only way to change many parameters of a virtual computer is to stop the guest OS. I just changed the type of NIC on all my virtual machines, except VirtualCenter, using this procedure:

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1007195

    I want to change the adapter for VirtualCenter to improve vmxnet as well. How to work around the Catch22 needing VC running to change virtual machines but requiring judgment VC to edit it?

    Laughing out loud

    Shut down the virtual computer. Open the VI Client and instead of the IP address / hostname of the VC Server enter the IP address / hostname of the ESX host. You must use an ESX account for it! If in doubt try then the VM VC is still under way.

  • How can I change the network address of my Time Machine drive?

    Hi people,

    This is my second question in 12 hours. Thanks to help I received here, I abandoned my doomed attempt to use my old AirPort Extreme and a USB key for Time Machine backups.

    I've used my ReadyNAS for Time Machine backups, but it has never been reliable. I think I have tracked the question and I would like to try again. However, Time Machine remembers the old network address for the ReadyNAS unit (smb://NAS_TimeMachine.local/ReadyNAS) and does not 'see' the same unit at current address (afp://[email protected]/NASTimeMachine). You could collect that networking is not something I understand.

    I think that this can be also responsible for the boring 'There was a problem... "messages that I receive at startup telling me the drive could not be mounted.

    Is there a way to force the time Machine to forget the old address and 'see' a new?

    See you soon,.

    Grant

    (PS I have also posted this question on the legacy of networking community, but I think it's a better place for this)

    Click the 'clock' Time machine at the top of the screen of the Mac

    Click Open Time Machine Preferences

    Click select drive

    Click on a disc that appears under the heading of backup discs , so that it appears highlighted

    Click remove disk

    Do the same for all the other disks that may appear under the heading of backup discs

    Turn off and restart the AirPort Extreme

    Restart the Mac.

    Click the 'clock' Time machine at the top of the screen

    Click Open Time Machine Preferences

    Click select drives

    Under the heading of available records , click a disk that you want to use to highlight the disk

    Click use the disk

    Close the windows

    Wait a few minutes to see if a backup will start. Otherwise, click the "clock" Time machine at the top of the screen, then click on NTI Backup Now

    Report on the results

Maybe you are looking for

  • How to replace the output buffer?

    I'm a generation of finite signals 2 lanes on a0 and a1. I want to change one or the other of the waveforms at various times during the program and sometimes I have to be able to overwrite the contents of the buffer with a new set of data until the g

  • Adobe installation window freezes screen asking 'does not.

    I have already installed all the adobe products, scanned model for viruses malware etc after 5 min working on anything it pop. any suggestions?

  • PhotoSmart 7520 - lines appear on the copies when you use introducer sheet

    I just bought the 7520 Photosmart all-in-one printer and everything seemed fine until I used the introducer sheet to copy a few pages.  They all came out with a vertical line about 1.75 "in from the right edge of the paper.   If I put the original on

  • Inserting a card Sony Pro MS in my SD card on my laptop.

    MS Pro card is much smaller than my SD card and it is difficult to move my fingers far enough to hire him.  I finally managed to do commit and has my pictures, but I hard a really hard time to remove. Is there an adapter that I use so I can take the

  • PowerEdge 2950 [MS]

    Buongiorno, avrei di preventivo need by: n. 01HARD DRIVE, 300G, SERIAL ATTACHED SCSI, 3, 10K, 3.5 " Server provider of it disco deve essere sostituito nella: Server: DELL PowerEdge 2950 Service etiquette: JH7FH2J Grazie Giovanni