Change an icon images to grayscale or color levels when it is disabled/enabled

I have a button in my application that is configured to be active when a tilelist (profile1EntertainmentAddLinksTilelist) has at least 1 point in it. I have a text but also a color icon in this button.

I currently have 2 functions of code 'convertToGrayscale()' which converts components into levels of gray and 'convertToColor()' which converts the components to the color.

What I want is so that when it is clicked the convertToColor apply to it even when disabled convertToGrayscale would apply to it.

I know there is a 'enabled' property in the buttons, but is not to be a fundamental property of "disabled".

Another problem is, within my button, I already have an enabled property so that when the tilelist component with a component, only then is enabled. Is it possible to add the convertToColor function in the property enabled so that it is activated when the tilelist component has more than 1 point in it that the button is enabled AND it converts the color? This is the bit I'm struggling with that.

Enabled = "{profile1EntertainmentAddLinksTilelist.SelectedItem}" "

This solution uses the change and valueCommit event.

If this post has answered your question or helped, please mark it as such.


http://www.Adobe.com/2006/mxml '.
Initialize = "initData (); » >
 
    Import mx.collections. *;
     
[Bindable] private var buttonEnabled:Boolean = false;

private var listArray:Array =]
{label: "item0"}, {label: "item1"},
{label: "item2"}, {label: "item3"}
];

[Bindable] public var TileListdp:ArrayCollection;
     
private void initData (): void {}
TileListdp = new ArrayCollection (listArray);
}
     
private function changeHandler (): void {}
buttonEnabled = tl.selectedIndex > = 0? true: false;
}
]]>
 
 
 
 

Tags: Flex

Similar Questions

  • How to change the icon of the node in a tree when the node collapse or expand?

    How to change the icon of the node in a tree when the node collapse or expand?

    Hello

    You may need to use the custom for this skin.

    Arun-

  • image to grayscale to color

    I have an image in grayscale I placed in Illustrator CS6. I would change the black to a Pantone color - turning it into a kind of Duotone.

    Is this possible or do I do in Photoshop first?

    I found a way "descendant" to do so using the change > > change the colors. But I must first choose to invert the colors, then adjust the balance of color..., then set the color opposite mode CMYK, then invert the colors even once. It is a major concern and will not work with a Pantone color.

    Thanks for your help, everyone.

    -Scott

    If a raster image, simply apply the Pantone color as a fill color.

  • Print images in grayscale with color covers

    I have an Illustrator CS5 document that uses placed images in grayscale on a white background. Everything seems on screen, but when I print the file a warm gray selection border appears around each image. I tried to use a Photoshop native files transparent, the EPS and TIFF files, but the problem persists. I am Mac OS 10.6.6. Everyone knows a similar problem and, if so, how do solve you?

    Thank you.

    Bob,

    If you save as PDF, buttons appear when you open the document in Acrobat/Reader to screen)? If this isn't the case, I think the question is outside of Illy and with the printer (pilot).

    Y at - he interpreted by the printer color management (pilot; you should be able to see under the ownership of the printer or something)? If so, try disabling it.

  • Why change the background image of the dashboard of data crash the app?

    I'm changing the background image of my dashboard (on a third generation iPad).  Whenever I try to make the change, the data dashobard app breaks down just.  Even if I try to change to a color, the application crashes.  I can insert a picture without problem.  I guess it's just a bug or something but has anyone else seen this problem?

    I was able to reproduce this crash with the following steps:

    -Set up a background image of a page

    -Copy the dashboard somehow. You can reproduce the dashboard, share by email, export and re - import OR clouds, etc.

    -Open the copy of dashboard

    -From the copy, change the background image (for a solid color or another image)

    If you set a background image of a page, close and reopen your dashboard and then try to change the background to something else, you will encounter this error.

    Solution: If you have the original background image in your Camera Roll, you can fall as an image on the same page (Photo Palette, select in the library). Then you can remove this image and change the background also image.

    If you do not have the original image, you may need to start with a new dashboard. (For each page on the old dashboard, you can tap the bottom, select all, copy / paste on another dashboard).

    There is a similar problem with images removed, if you shared the dashboard and you work on a copy. In this case, the solution is to copy and paste the image before deleting. (Otherwise, you'll get a dialog error instead of an accident, but the image is not clear).

    I deposited cars for these issues internally. Sorry for the inconvenience.

  • How can I change the background image for the lock screen?

    Hi, I just bought a new laptop and I got Windows 7 installed in the store, and I would like to change the background image for the lock screen.  When I went to activate my account, I found out that it has already been activated, but I can't find the settings-> settings more PC in the lower corner on the right.  Thank you!

    Lock screen?

    Are you referring to the login screen?

    Or wallpaper?

    Right-click on your desktop and select Personalize.

    Office link is at the bottom left and use a win-7 theme.

  • How can we change the brand image on the timeline

    How do you change the brand image on the timeline so that when you put it on a cut, you know that you have found the end of the shooting and not the first image of the other shooting? Any help would be appreciated.

    Is there anyway to change the way it marks a release point?

    N ° point marked became get where is the head of reading, and as always get is placed at the head of the frame.  You will need to take a step back a frame, no way around it when moving to the edit point.

    However, you can mark a more easy clip by selecting it and pressing the key.  This will put the In and out of the points for this clip at the same time.

  • How can I change the size of text and background color?

    How can I change the size of text and background color? When I select the text box and change the height, nothing happens. If I drag the box is smaller, it just jumps back to where she was. If I try to change the color, (which is set to 'default' gray), no color, it still shows as white on preview. Because I can not change the size of text box, I need to at least make the clear background because it's something that overlap.

    Answered my own question kind of... I had to go into the 'code' and change the settings manually. Why even have the options in 'view designer' to change the size of text box or color if it doesn't?

  • My destop all icons are colored and when I try to make crystal or visible, I can't change

    My destop all icons are colored and when I try to make it transparent or visible, I can't change

    Click the Start button, select Control Panel

    Check points: -.
    1. in the performance and Maintenance/adjust Visual effects or if you use the classic theme - settings/system/advanced/performance
    'Use the shadows of the desktop icon labels -' must be checked
    2. right click on the desktop, point to arrange icons by and ensure that items Web Lock on Desktop is unchecked;
    3. If you have content web on your desktop, transparency does not do a right click on the desktop. Select properties, then go to the Desktop tab.
    Click on the button customize the desktop, and then open the Web tab.
    Uncheck everything in the box of Web Pages
    Press OK, then apply and OK again.
    4. you can't have a file html as wallpaper, it must be an image file.
    It is sometimes necessary to restart to take effect, sign out and then sign back in.

  • Change the preview image of audio files (no icon) in the Finder?

    I know that this is easily done in iTunes, simply by changing the 'work' of the song.

    But I need to do it outside of iTunes, and I need to change the preview image and not the image of the icon.

    Many tutorials show how to easily change the icon of a file, but I found nothing on the change in the preview...

    As said, I need to do it in the Finder, or perhaps with Quicktime? I don't know how I can use it, if necessary.

    I need to have the work I want already in the file before you import it into iTunes, regardless of the reason for which I won't get into that.

    You can use a tag editor to third party such as Meta-z for the files to m4a format.  I would recommend the Rage of free media now, but I can't find a download link works.

  • When I drag an image URL, such as for Amazon to the dock, changes the image to an image any ordinary of the world.  How can I change this image to the original Amazon icon image when turned on the docl?

    When I drag an image to icon URL, such as for Amazon to the dock, changes the image to an image any ordinary of the world.  How can I change this image to the original Amazon icon image that existed before I moved to the docking station?

    Why do you want to put the URL in the Dock, which doesn't seem like the appropriate place for this.

  • How can I change display of grayscale to color display

    How can I change display of grayscale to color display

    Hello

    On your iPhone, in the application of the watch, go to: Watch My > General > accessibility > under the title of 'Vision', uncheck / disable the grayscale option.

  • Convert an image to grayscale 10-bit color

    Hi all

    I am a programmer of experience of labview 8 years, but new to the procession of the image or NOR-Vision. And now, I came to a problem with the conversion of the image.

    I have an image acquisition card that acquires 1 k * 1 k 10-bit grayscale image, I saved the image acquired in *.raw (binary) format, and now I have to convert these images to bmp (jpeg, png, or diff) format. When I try to use the VI "Imaq save 2", I got an error saying something like "unsupported image type. After searching this forum, it seems that if I have to use an image of color type save as bmp format, but to receive my 10-bit RAW files, I first need to create an image in grayscale U16. So, how can I solve this problem?

    Thanks for your suggestions!

    My guess: you're referring to the 'writing IMAQ 2.VI of the file' as I do not know everything "IMAQ save...". Screw.

    The 'writing IMAQ 2.VI of the file' does not support writing 16-bit BMP.  You can take this information among image types supported this VI, see here.  Look at the pictures above, the designation of VI: 'IMAQ writing file BMP 2' says that he accepts "U8" and "RGB32 image types.

    Proposal: Write a PNG image.

  • All users of Win XP icon - the icon image change default image

    original title: all users of Win XP icon

    I created an icon (shortcut) in windows XP under profile all users. I packed up, and then a msi that would place under all users when th msi is run. The question I have is that the shortcut works fine but won't stay icon (image) and I has a value default image icon appears. If explore you the where the shortcut is... The icon shows (in the user profile all).

    How can I fix?

    Hi Peace_DOR,

    See the below Microsoft article and try the steps mentioned, check if it helps.

    Icons randomly change to different icons

    http://support.Microsoft.com/kb/132668

  • How can I change hard drive icon images?

    I have a strange problem that has just occurred in Windows 7.

    I have several hard drives internal and 1 external hard drive.  The external hard drive has always had its own unique icon and internal hard drives all have the same icon image.

    But somehow, the external drive now has an image of the icon of an internal hard drive, and my biggest drive, a HD 1.5 TB, shows the icon used previously by the external hard drive.

    I can't understand why this happened, or how to redefine the way it was.  Don't pose any problem of performance, its just confusing because I saw this image external drive so long I'll automatically for the picture if my computer or Explorer and now that means that I often select the wrong drive.

    I click on properties > customize and select change image folder, then select a hard drive icon I want for each player, but he never changes the icon.  And I'm pointing to an appropriate *.ico icon image file.

    Anyone has any ideas on this issue?

    Thank you.

    Move the Autorun.inf file and the Mxoicon6.ico file on your external hard drive, and restart the computer. Microsoft MVP Windows Desktop Experience

Maybe you are looking for