Icons(images in Combobox) read from folder in project

Hi everyone,
I'm trying to populate these icons (images) from the img folder under my project. Most of these icons are in .png format and I want to populate them into the ComboBox which i have. On top of that, when the user selects one of the icons from the ComboBox, I need to show the icon on the ComboBox which now I'm only able to show the label that is being tagged to it. I saw the IconComboBox.as example but I can't apply them to my current design.
Is there a way to achieve it?
My codes for the CheckBoxes and ComboBoxes:
<mx:Panel id="layerPanel" backgroundColor="#ffffff" height="220" width="220"
  title="Layer Control Manager" showEffect="WipeRight" hideEffect="WipeLeft"
  horizontalScrollPolicy="off" verticalScrollPolicy="off">
  <mx:VBox height="140" width="400" horizontalScrollPolicy="off">
   <mx:List id="layerList" itemClick="layerList_changeHandler(event)"
   alternatingItemColors="[#EEEEEE, white]" selectable="true"
   dataProvider="{lstDataProvider}" labelField="name" height="190" verticalScrollPolicy="off">
   <mx:itemRenderer>
    <mx:Component>
     <mx:HBox>
      <mx:CheckBox id="chkBox" change="layerCheckBox_onChange(event);">
      <mx:Script>
      <![CDATA[
      import mx.controls.Alert;
      import mx.events.FlexEvent;
      override public function set data(value:Object):void
       super.data = value;
       if(value != null)
        chkBox.selected = value.isSelected;
        if(!chkBox.selected)
         comboBox.selectedIndex = -1;
         comboBox.prompt = "Please Select";        
         comboBox.enabled = false;
      private function layerCheckBox_onChange(evt:Event):void
       data.isSelected = !data.isSelected;
       if(data.isSelected)
        comboBox.enabled = true;
       else
        comboBox.enabled = false;
       if(data.isSelected && comboBox.selectedIndex > -1)
        this.dispatchEvent(new Event("addImageToApplication", true));
      ]]>
      </mx:Script>
      </mx:CheckBox>
      <mx:Label text="{data.label}" />
      <mx:ComboBox id="comboBox" enabled="false" width="100%" change="onComboBoxChange(event)" dataProvider="{outerDocument.comboBoxArray}" prompt="Please Select">
       <mx:Script>
        <![CDATA[
         import mx.controls.ComboBox;
         private function onComboBoxChange(evt:Event):void
          var myCombo:ComboBox = evt.currentTarget as ComboBox;
          //if(data.label == myCombo.selectedItem.label)
           outerDocument.comboImageUrl = myCombo.selectedItem.src;
           if(data.isSelected)
            this.dispatchEvent(new Event("addImageToApplication", true));
        ]]>
        </mx:Script>
       <mx:itemRenderer>
        <mx:Component>
         <mx:HBox horizontalScrollPolicy="off">
          <mx:Image source="{data.src}" width="20" height="20" maintainAspectRatio="false" />
          <mx:Label text="{data.label}" />
         </mx:HBox>
        </mx:Component>
       </mx:itemRenderer>
      </mx:ComboBox>
     </mx:HBox>
    </mx:Component>
   </mx:itemRenderer>
   </mx:List>
  </mx:VBox>
<mx:VBox top="165" left="30">
  <mx:Button label="Reset List" width="160" id="resetBut" click="resetList()"/>
</mx:VBox>
</mx:Panel>

http://blogs.adobe.com/aharui/2007/04/icons_in_combobox.html
This didn't work for you?
- Jason

Similar Messages

  • File-Sender Adapter File not read from folder

    Hi everybody,
    in CC monitoring I see that the adapter poll successful on a folder. But the file is not read! The mode is "delete"
    Any ideas?
    Regards Mario

    hi mario,
    is ur CC "green" in Adapter monitoring?
    generally wen the file is polled but bot deleted this is the problem with authorization for deletion for that destination n we c "red" in CC monitoring.
    but this case doznt ensure that ur scenario hasnt run. the scenario may still be successful and the problem may be only with deleting the file.
    regards,
    latika.

  • Time Machine backs up to one profile, and reads from another

    I have been running backups with Time Machine, for about 2 months now. Until now, I've never really looked closely at what comes up when I run TM.
    Today I've found that when the app is run, I can only jump back to states from the first two days that were backed up - 25th and 26th August, even though I've seen and forced backups throughout these 2 months.
    When I look in the "Backups.backupdb" folder, there seem to be two computer profiles for backing up. They are both the name of my computer, with the second one having a number 2 appended to the folder name.
    Inside the number 2 folder, I can see all of the backups performed since 26 August. It seems that my Time Machine is backing up to folder 2, but reads from folder 1!
    I don't mind deleting the whole TM setup, and starting again. In some ways I prefer it, as I want to partition this drive (but not format it), and place the TM backups on a separate partition. I'm just a little cautious of deleting backups.backupdb folder, or anything inside this.
    Does anyone know what's happening, and can I delete the "backups.backupdb" folder, or one of these backup profiles inside without stuffing things up?
    Cheers

    You only have one Mac backing up to the Time Machine disk?
    If so, then at some point, Time Machine lost track of the first set of backups and began a second set. Do you recall any event a day or two after you began using Time Machine that might explain this? Perhaps a system crash or swapping drives somehow? Something cause Time Machine to abandone the first set and start fresh.
    If you are going to repartition the drive, here is some advise regarding how to proceed...
    *_How Should a Time Machine Hard Disk be Prepared?_*
    For Time Machine to work properly, the hard disk must be formatted “Mac OS Extended (Journaled)” and its’ Partition Scheme should be either GUID or Apple Partition Map.
    Time Machine is incompatible with disks partitioned as Master Boot Record (MBR). Unfortunately, this describes nearly every hard drive you can buy because MBR is a Windows partition scheme. (Naturally, this DOES NOT apply to Apples’ Time Capsule.)
    For some, Time Machine begins to perform as expected with a new external hard disk. But then the initial full backup or subsequent incremental backups fail. The user only later discovers the hard disk was still partitioned as Master Boot Record (MBR).
    One article on Time Machine made this observation: “Virtually everybody will have to open Disk Utility and repartition the disk as APM or GUID. It doesn't really matter which one because the Time Machine disk will not be bootable anyway. APM allows a disk to boot a PowerPC, GUID allows the disk to boot an Intel processor but both are easily digestible by Time Machine on either kind of processor.” [http://www.girr.org/mac_stuff/backups.html]
    It’s been recommended by many here that your reserve +at least+ double the size of your primary hard disk, that way Time Machine backups have room to grow as the size of your data grows. Additionally, the more space you give Time Machine the more history it can preserve. The less space you reserve for Time Machine the sooner older backups & deleted items will disappear.
    One poster recommended this regarding multiple partitions: “If you do create multiple partitions (half and half would be a good place to start), make sure you use the first partition for Time Machine, and the second for your own stuff (the first one will be on top in the graphical representation shown in Disk Utility; you'll understand when you see the partition tab). This way, you can expand the Time Machine volume at any later time by deleting the second partition. Disk Utility allows this dynamic re-sizing of volumes, but volumes can only be expanded toward the end of the drive, when a volume that comes after is deleted to create the room.” [http://discussions.apple.com/thread.jspa?threadID=1712437&tstart=0]
    Procedure
    Connect the hard disk you wish to use for Time Machine backups.
    Launch Disk Utility.
    It will appear twice in the pane on the left. (Make sure you recognize that it is different from the 2 icons that represent your Macs' internal drive.) The upper entry represent the device as a whole, including the controller inside. The lower entry represents the hard disk contained within the device.
    Click on the upper icon of the external hard disk.
    Select the "Partition" tab.
    For "Volume Scheme" choose "1 partition". (Choose 2 partitions if you intend on storing other data on the disk besides your Time Machine backups. Ensure that the two partitions have different names.)
    Name the disk.
    Format should be "Mac OS Extended (Journaled)".
    Click "Options".
    Select either GUID or Apple Partition Map. (See above for significance)
    Click "OK".
    Click "Apply". Then click “Partition”.
    Once the external hard disk is repartitioned, select it again in Time Machine preferences and use it for your backups. If you chose to create 2 partitions, then select the first partition for Time Machine backups, and the second for additional files/folders.
    Let us know if this was helpful.
    Cheers!

  • Read an avi file using "Read from binary file" vi

    My question is how to read an avi file using "Read from binary file" vi .
    My objective is to create a series of small avi files by using IMAQ AVI write frame with mpeg-4 codec of 2 second long (so 40 frames in each file with 20 fps ) and then send them one by one so as to create a stream of video. The image are grabbed from USB camera. If I read those frames using IMAQ AVI read frame then compression advantage would be lost so I want to read the whole file itself.
    I read the avi file using "Read from binary file" with unsigned 8 bit data format and then sent to remote end and save it and then display it, however it didnt work. I later found that if I read an image file using "Read from binary file" with unsigned 8 bit data format and save it in local computer itself , the format would be changed and it would be unrecognizable. Am I doing wrong by reading the file in unsined 8 bit integer format or should I have used any other data types.
    I am using Labview 8.5 and Labview vision development module and vision acquisition module 8.5
    Your help would be highly appreciated.
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    read avi file in other data format.JPG ‏26 KB

    Hello,
    Check out the (full) help message for "write to binary file"
    The "prepend array or string size" input defaults to true, so in your example the data written to the file will have array size information added at the beginning and your output file will be (four bytes) longer than your input file. Wire a False constant to "prepend array or string size" to prevent this happening.
    Rod.
    Message Edited by Rod on 10-14-2008 02:43 PM

  • How to set folder icon image in OS X Lion?

    I set my folder's icon image in OS X Leopard before, but I don't know how to do that in Lion.  In Leopard you simply copy the icon image from an Info window of a file, and paste that into the folder's icon image in the top left corner of its Info window.  In Lion I don't see the icon of the file in its Info window as a preview, but rather I see only a generic JPG file icon.  Any ideas?

    Can you explain why there was no thumbnail for that file?
    The OS does not create or add thumbnails, previews, nor custom icons to images or other files. Although it displays files with what appears to be a custom icon, it is not part of the file itself; it is created on the fly, just for display. Since it is not part of the file, it does not appear in the Get Info window.
    Back in OS 9 days when you downloaded an image file from the web, either via drag and drop or via the download mechanism, the image file would typically be placed on the drive as a QuickTime image with both a custom icon and a preview image added to it.
    I skipped earlier versions of OS X, and started with Snow Leopard, so don't know about earlier versions of OS X. Apparently the auto creation and addition of a custom icon and preview have been dropped in later versions in favor of using Preview to generate a temporary (for display only) custom icon on the fly. One result of this is that image file sizes are kept reasonably small - adding a suite of custom icons and a preview image to the file itself increases the file size a lot; it's not unusual for those additions to double the file size, or more.

  • How to get all images from folder in c#?

    I am trying to get all images from folder. But it is not executing from following:
     string path=@"C:\wamp\www\fileupload\user_data";
                string[] filePaths = Directory.GetFiles(path,".jpg");
                for (int i = 0; i < filePaths.Length; i++)
                    dataGridImage.Controls.Add(filePaths[i]);
    Please give me the correct solution.

    How to display all images from folder in picturebox in c#?
    private void Form1_Load(object sender, EventArgs e)
    string[] files = Directory.GetFiles(Form1.programdir + "\\card_images", "*", SearchOption.TopDirectoryOnly);
    foreach (var filename in files)
    Bitmap bmp = null;
    try
    bmp = new Bitmap(filename);
    catch (Exception e)
    // remove this if you don't want to see the exception message
    MessageBox.Show(e.Message);
    continue;
    var card = new PictureBox();
    card.BackgroundImage = bmp;
    card.Padding = new Padding(0);
    card.BackgroundImageLayout = ImageLayout.Stretch;
    card.MouseDown += new MouseEventHandler(card_click);
    card.Size = new Size((int)(this.ClientSize.Width / 2) - 15, images.Height);
    images.Controls.Add(card);
    Free .NET Barcode Generator & Scanner supporting over 40 kinds of 1D & 2D symbologies.

  • Disk Utility 'Disk Image from Folder' looses file create date?

    Hi,
    I have been working on creating backups that maintain the files' create dates. I have found the following anomoly using Disk Utility.
    If I create a Disk Image From Folder, the create dates of all files are changed to be the same as the last modify dates. Not what I want.
    If I creat a Blank Disk Image, and then using Finder to copy the files to the Disk Image, the create dates remain unchanged.
    I can then burn the backup CD's with the Disk Image and the files' create dates are maintained. So, future restore from the backup CD will contain the original files' create dates.
    Does anyone know if Disk Utility's Create Disk Image from Folder is supposed to loose the files' create dates? What other file attributes are being lost? Mac OS X maintains all of these attributes, and create dates via Finder copies, I would expect the Disk Utility Create Disk Image from Folder to do the same.
    Bob Horton

    To follow up on this post, I know at least part of the answer. The difference between the two becomes clearer if you read the documentation (man pages) for hdiutil and asr. Image 1 will be created in file mode, whereas image 2 will be in block mode, ie bypassing the file system. Image 1 will consist of a series of files, whereas image 2 will contain a series of blocks, mirroring the original layout of the hard disk.
    Technically the latter should be faster to restore (in block mode), although Apple recommend the first procedure (see man page for hdiutil). I haven't seen any evidence that images created in block mode can be mounted or restored, although you might be able to burn such images to a optical disks if applicable.
    As I've pointed out in another thread (http://discussions.apple.com/thread.jspa?threadID=1508199&tstart=0) I believe that this functionality should not be offered in disk utility, and I consider it a serious bug.

  • Using finder icon to navigate continuously from folder to folder

    A consultant set our old G5 (OS 10.4.11) so you could click and hold on the finder icon to open the HD and navigate continuously from folder thru subfolder, thru subfolder, thru subfolder, etc (like dragging and dropping a file – except without the file). Wanted to set my Intel Mac to do the same.  Messed up the old computer trying to figure out what the consultant had done (I think he altered sidebar options in finder preferences).  Now, when I click and hold on the finder a little window opens with the name of the computer, and below it says "hide."  (On my Intel Mac it just says "hide")  Wife's gonna kill me!  How do I restore old G4?  Can I get my G5 to open folders the way the G4 did, by just holding down on the finder icon?

    Thanks Kappy,
    I do get the "pop" feature when I drag my HD icon to the dock, next to the trash, but when using the "pop" feature I have to click on each individual subfolder I need to open to get to my destination.  The way our G4 worked required only a single click on the Finder icon.  By clicking on it, and then keeping the mouse held down, the HD would open, showing all its folders.  Dragging the mouse arrow to any single folder opened its window to reveal its subfolders.  Dragging to one of those folders opened its window, allowing you to drag to the next subfolder and the next - down the entire hierarchy to reach any sought-for file, without having to do any more clicking.  Do you know a way to restore that feature to the G4?   Any way to get it to work on my Intel Mac?
    Thanks in advance.

  • Hi everyone!  I turned on my computer the other day and the icon for Safari was missing from my dock.  I looked in the applications folder and it is no longer there.  Does anyone know how I can get safari if I have no internet search engine?

    Hi everyone!  I turned on my computer the other day and the icon for Safari was missing from my dock.  I looked in the applications folder and it is no longer there.  Does anyone know how I can get safari if I have no internet search engine?  I

    Safari 5.0.6 for Leopard can be downloaded from here:
    http://support.apple.com/kb/DL1422
    Does anyone know how I can get safari if I have no internet search engine?
    How did you post here?

  • "Disk Image from Folder" from iPod

    Using Disk Utility, I have tried to create a disk image of my iPod using the "Disk Image from Folder" option.
    These are the settings I am using:
    Location of Image: Desktop
    Format: read/write
    It asks for my password, and then it briefly is in the "Initializing..." phase (less than a second), and then it gives me the error 'Unable to create "MATTSH_IPOD" - internal error.'
    What should I do? I tried creating an image from another folder, it works fine.
    I can't create an image by device, because I won't have enough free space...
    Keep in mind I am running a new MacBook Pro (yay). Also note that the iPod is formatted in FAT32.
    Any ideas??
    Thanks in advanced for any help.
    ~Matthew Strax-Haber

    726/3172
    Hi Matthew,
    I don't own an iPod, but here's what I'd try:
    Quit Disk Utility.
    First, download and install TinkerTool.
    Then in TinkerTool's Applications section, choose "Enable extended options when converting disk images".
    I don't know if you need to logout/login at this point.
    Now open Disk Utility and try the "iPod image" format.
    Let us know if it works for you.
    Axl

  • I desperately to uninstall adobe reader from my Mac book air. I sent adobe reader to trash and afterwards look for internet plugs in in library but the folder is empty. Can anybody help me?

    I desperately need to uninstall adobe reader from my Mac book air. I sent adobe reader to trash and afterwards look for internet plugs in  library but this folder is empty in my library. Can anybody help me?

    I looked for plugs in in my library but the folder internet plugs in is empty

  • After updating I ended up with 4 icons on my desktop - I cannot delete any of them. The error message reads; "Cannot read from the source file or disk".

    I updated from the original version to 6.0.1 and when I re-started FF there were 4 icons on my desktop. I managed to delete one of them, but I cannot delete the other two - to leave me with just one.
    I get the error message of "Cannot delete file: Cannot read from the source fie or disk".

    Here's the meaning of the error that you received.
    "An error has occurred. ERROR :10-FC06-0002" -- may be caused by damaged recovery media or faulty hard drive"
    Possible that the problem is on the recovery also.
    Hope this helps.

  • Read contineously file from folder

    HI
    I have 1000 of files and I want read files from folder automatic. Each file ends with
    if $BATCH_FILE==true
    define $END,false
    else
    power off
    define $END,true
    if 1 text file is finish then it should load another file automatically

    Hi kalu,
    don't know what you're trying to do:
    - you have a "path" control but you don't use it for ListFolder...
    - you get an array of filenames from ListFolder, but you don't use that data later on...
    - you are using "OpenFile"/CloseFile to get a file path (in the event) and later on you use that path to read data from...
    Your original question doesn't has anything in common with those things you do now...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Getting error Can't read from the source or disk when moving documents from one folder to another folder in the library

    Hi,
    When we try to move documents from one folder to another folder in the document library using "Open with explorer" getting beloe error.
         Can read from the source file or disk.
        The user having below permission for the Library as well as site.
    Fullcontrol,Limited access--->Given directly
    Read,Limited access--->Givin through the all Test grp
    Contribute,Limited Access-->given through test members grp
    Read,Limited access---> givin through The group grp
    Could you please help me anyone....
    Thanks

    Hi Reddy,
    If you are moving files in two libraries in different sites, then the error will occur and it is by design that there are limitations on the DAV move commands that the DAV client is respecting.
    https://social.msdn.microsoft.com/Forums/en-US/6245f332-c609-4a7b-8e00-c8b5e46f7759/cant-move-files-using-windows-explorer-cant-read-from-source?forum=sharepointgeneral
    If you are moving files in the same library, I recommend you to use Wireshark to reveal the error message and enable IIS
    Trace Logging for Failed Requests to examine the IIS log file for troubleshooting.
    https://social.msdn.microsoft.com/Forums/en-US/47cd569d-98f2-4cca-b78e-fd178c097285/cant-read-from-the-source-file-or-disk?forum=sharepointgeneralprevious
    To narrow down the issue scope, I recommend you to test with another library and see if the copy in explorer can work.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Reading files from folder in java

    Hi ..I am new to java ..can you help me ..how to read the files from folder(containing 10 java files) and store in a array..
    Thanks

    use the java.io package, more specifically java.io.File. You can construct a new File by passing in a String version of the pathname, and then store that into your array.

Maybe you are looking for

  • MacBook Pro freezes when I try to open anything

    Whenever I boot up my MacBook Pro, I let it warm up for about 5 minutes. Then, when I try and click and click on anything, like the browser, the whole computer freezes and the only thing I can do is force it to shut down by holding down the power but

  • How to handle comma while importing CSV file in APEX 3.2

    I am trying to import excel sheet data into a table. I have followed steps mentioned in below link and they work just fine with one exception. http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/ Exception is relat

  • Updating CC and Bridge

    I keep being asked to download updates for Photoshop and Bridge. It tells me It has been done, but the next day I'm told to do it again.

  • Storing Vector Application Scope - Pressed for time

    I'm reading in a file through my application and right now every time a user goes to the page, the file is being read in and parsed etc etc to be formatted for display. Now, I know this can hamper performance dramatically as the users increase, and I

  • Yahoo mail is not working on our iMac 9.0 OS

    Yahoo mail which previously worked on our (older) iMac 9.0x OS suddenly stopped working. Is it the simple problem with the browser (Internet Explorer 7 I believe) being old? Because the OS is older? Do we simply need to upgrade to a newer operating s