Load mutiple stories

Hi
I have a
<mx:List id="storyList" width="100%" dataProvider="{this.xxx.stories}" height="100%" variableRowHeight="true" selectable="true" useRollOver="true" borderStyle="none"
itemRenderer="StoryRenderer" horizontalScrollPolicy="on" verticalScrollPolicy="auto" wordWrap="true">
</mx:List>
when i load multiple stories with a scrollbar, the stories gets collapsed, that is the stories get overlapped with other story texts...
Thanks

Hey Harish!
Your problem is that your itemRenderer just needs some kind of layout. Put the content inside your itemRenderer, such as labels, buttons, text, or whatever in a containor like vgroup or something. Within the List component, between <s:list> </s:list>, give it a layout such as:
<s:layout>
<s:VerticalLayout
</s:layout>
That, my friend, should resolve your problem.
In your example it would look like this:
<mx:List id="storyList" width="100%" dataProvider="{this.xxx.stories}" height="100%" variableRowHeight="true" selectable="true" useRollOver="true" borderStyle="none"
itemRenderer="StoryRenderer" horizontalScrollPolicy="on" verticalScrollPolicy="auto" wordWrap="true">
<s:layout>
<s:VerticalLayout
</s:layout>
</mx:List>
If that doesn't work, I'll be happy to help you out more, but that should do it. I encountered this problem in the beginning myself.

Similar Messages

  • How to load mutiple image

    I'm trying to create a photo manager but I can't find a way to load multiple images onto my frame. I have a thumbnail class that makes thumbnails for an image (which is a modified version of the class ImageHolder from FilthyRichClient)
    public class Thumbnails {
         private List<BufferedImage> scaledImages = new ArrayList<BufferedImage>();
    private static final int AVG_SIZE = 160;
    * Given any image, this constructor creates and stores down-scaled
    * versions of this image down to some MIN_SIZE
    public Thumbnails(File imageFile) throws IOException{
              // TODO Auto-generated constructor stub
         BufferedImage originalImage = ImageIO.read(imageFile);
    int imageW = originalImage.getWidth();
    int imageH = originalImage.getHeight();
    boolean firstScale = true;
    scaledImages.add(originalImage);
    while (imageW >= AVG_SIZE && imageH >= AVG_SIZE) {
         if(firstScale && (imageW > 320 || imageH > 320)) {
              float factor = (float) imageW / imageH;
              if(factor > 0) {
              imageW = 320;
              imageH = (int) (factor * imageW);
              else {
                   imageH = 320;
                   imageW = (int) (factor * imageH);
         else {
              imageW >>= 1;
         imageH >>= 1;
    BufferedImage scaledImage = new BufferedImage(imageW, imageH,
    originalImage.getType());
    Graphics2D g2d = scaledImage.createGraphics();
    g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
    RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2d.drawImage(originalImage, 0, 0, imageW, imageH, null);
    g2d.dispose();
    scaledImages.add(scaledImage);
    * This method returns an image with the specified width. It finds
    * the pre-scaled size with the closest/larger width and scales
    * down from it, to provide a fast and high-quality scaled version
    * at the requested size.
    BufferedImage getImage(int width) {
    for (BufferedImage scaledImage : scaledImages) {
    int scaledW = scaledImage.getWidth();
    // This is the one to scale from if:
    // - the requested size is larger than this size
    // - the requested size is between this size and
    // the next size down
    // - this is the smallest (last) size
    if (scaledW < width || ((scaledW >> 1) < width) ||
    (scaledW >> 1) < (AVG_SIZE >> 1)) {
    if (scaledW != width) {
    // Create new version scaled to this width
    // Set the width at this width, scale the
    // height proportional to the image width
    float scaleFactor = (float)width / scaledW;
    int scaledH = (int)(scaledImage.getHeight() *
    scaleFactor + .5f);
    BufferedImage image = new BufferedImage(width,
    scaledH, scaledImage.getType());
    Graphics2D g2d = image.createGraphics();
    g2d.setRenderingHint(
    RenderingHints.KEY_INTERPOLATION,
    RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2d.drawImage(scaledImage, 0, 0,
    width, scaledH, null);
    g2d.dispose();
    scaledImage = image;
    return scaledImage;
    // shouldn't get here
    return null;
    A loop will loop through a collection of files and pass them to the constructor of Thumbnails to create thumbnails and then set them as icon for JLabels that will be added to a JPanel, but it throws a java.lang.OutOfMemoryError at this line:
    BufferedImage originalImage = ImageIO.read(imageFile);
    even when there're only about 8 image files in the collection (total size 2,51MB).
    I've seen other people's software that could load hundreds of photos in a matter of seconds! How do I suppose to do that? How to load mutiple images efficiently? Please help!! Thanks a lot!

    another_beginner wrote:
    Thanks everybody! I appreciate your help! I don't understand why but when I use a separate thread to do the job, that problem disappear. You were likely doing your image loading and thumnail creation on the Event Dispatching Thread. Among other things, this is the same thread that updates and paints your panels, frames, buttons, ect.. When a programer does something computationaly expensive on the event dispatching thread then the GUI becomes unresponsive until the computation is done.
    Ideally what you want to do is load images and create thumnails on a seperate thread and update your GUI on the event dispatching thread. I supect that while you are finally doing the first item, you might now be violating the second item.
    Whatever, the program seems to be pretty slow on start up 'cause it have to reload images everytime. I'm using Picasa and it can display those thumbnails almost instantly. I know that program is made by professionals. But I still want to know how.I took a look at this Picasa you mentioned. It's the photo manager from google right? You're right in that the thumnails display instantly when starting up. This is because Picasa is actually saving the thumnails, instead of creating them everytime the program starts up. It only creates the thumnails once (when you import a picture) and saves the thumnail data to " +*currentUser*+ /AppData/Local/Google/Picasa2/db3/" (at least on my computer --> Vista).
    Also, if your looking for speed then for some inexplicable reason java.awt.Toolkit.getDefaultToolkit().createImage(...); is faster (sometimes much faster) than ImageIO.read(...). But there comes a price in dealing with Toolkit images. A toolkit image isn't ready for anything until it has been properly 'loaded' using one of several methods. Also, when you're done and ready for the image to be garbage collected then you need to call Image.flush() or you will eventually find yourself with an out of memory error (BufferedImages don't have this problem). Lastly, Toolkit.createImage(...) can only read image files that the older versions of java supported (jpg, png, gif, bmp) .
    And, another question (or maybe I should post it in a different thread?), I can't display all thumbnails using a JPanel because it has a constant height unless I explicitly set it with setPreferredSize. Even when put in a JScrollPane, the height doesn't change so the scrollbar doesn't appear. Anyone know how to auto grow or shrink a JPanel vertically? Or I have to calculate the preferred height by myself?Are you drawing the thumnails directly on the JPanel? If so then you will indeed need to dynamically set the preferred size of the component.
    If not, then presumebly your wrapping the thumnails in something like a JLabel or JButton and adding that to the panel. If so, what is the layout manager you're using for the panel?

  • Can't load App Store on my macBook Pro.  Error is; You cannont open the application "App Store" because it is not supported on this system.  How can I upgrade App Store or download new version?

    Can't load App Store on my macBook Pro.  Error is; You cannont open the application "App Store" because it is not supported on this system.  How can I upgrade App Store or download new version?

    Problem now resolved as I upgraded to Snow Leopard 10.6.  Seems App Store doesn't like anything previous to 10.6.

  • BMP EJB Load and Store is calling only one time calling in a loop

    Loop Iterating two times but ejb load and store is calling only one time.
    Application deployed in 0c4j 10.1.2.0.0 container.

    This sounds more like a Teststand quesstion. You might want to post it there.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Error 501 when loading iTunes Store in iTunes AUTOFIXED

    When i click the iTunes Store button in the right corner it says that there was an error when loading iTunes Store, and mention into brackets that it's the Error 501.i'm using a macbook pro 13.3 i7 with mountain lion.
    Thanks.
    AUTOFIXED
    i just close the iTunes app and open it again. Then the iTunes Store will work.

    When i click the iTunes Store button in the right corner it says that there was an error when loading iTunes Store, and mention into brackets that it's the Error 501.i'm using a macbook pro 13.3 i7 with mountain lion.
    Thanks.
    AUTOFIXED
    i just close the iTunes app and open it again. Then the iTunes Store will work.

  • My pc does not load iTunes store

    My windows is not loading iTunes store and I can not download songsvetc

    1.  I click on Itunes
    2. I click on store
    3.  I get this message, see
    4. either choice ends up with nada.
    thx.

  • HT1725 Dowon loads from store never work.... wasted time and money

    Dowon loads from store never work.... wasted time and money

    Thanks for reading and thanks for the advice. Perhaps I'll ask them about it next time this problem occurs, although carrying the thing through a mall that is only about a mile away is the least of my worries. I'll do if it is both free (I don't make enough at my job to pay for such a service) and relatively speedy, although I'd hate for them to come over and for the computer to work properly (as bad as that sounds). It'd be a wasted trip and nothing would get fixed.
    I'm contemplating videotaping myself performing my "fixes" on it the next time I have this problem.

  • Cannot load iTunes Store

    I am having problems loading the iTunes Store.  I have updated to the latest version, still no luck.  I was also having trouble syncing my phone so I uninstalled iTunes and all associated programs as suggested on the support page and reinstalled.  Still cannot load iTunes Store.  Any suggesstions???

    Nevermind- followed this tip from another user and all is well now
    For any others of you having the problem, follow this:
    try this:
    Start --> Programs --> Accessories (Right Click on Command Prompt) --> Run as Administrator
    then type in:
    netsh winsock reset
    After this restart - it worked for me perfectly

  • My iphone 5 and ipad 4th generation having the same problem of connecting to wifi, cannot load app store and cannot connect to itune store... help !!

    my iphone 5 and ipad 4th generation having the same problem of connecting to wifi, cannot load app store and cannot connect to itune store... help !!

    Try this:
    1. Close all apps in the Task Bar. Double-click the Home button and hold apps down for a second or two. Tap the minus sign to close app.
    2. Hold the Sleep and Home button down until you see the Apple Logo.

  • Identifying Loads and Stores within the LSU block of OpenSPARC T1

    I am trying to find a signal or a group of signals within the LSU block of the OpenSPARC T1 which will inform me that a new load or store has arrived.
    I'm setting up a counter for each new load and for each new store that I observe, so ideally I want to have two signals, e.g. isLD and isST, that I could create from existing signals to signal the proper increment of my counter.
    The micro-architectural specs are not specific enough and though I have searched through the blocks signals by running simulations and observing wave dumps, I cannot seem to locate what I need.
    I appreciate your help!

    Hello,
    Thanks for your reply. I've read the L1 Dcache part of the OpenSPARC T1 Microarchitecture Specification, however, I still cannot figure out the meaning and function of some signals. I think I have to read other parts of the OpenSPARC T1 Microarchitecture Specification, in order to know more about the meaning of abbreviations in OpenSPARC codes.
    As for my project, my main aim is to be clear about the OpenSparc L1 Dcache. Since members in our group are all newcomers to OpenSparc, our director hopes that we can get some practical technics by reading OpenSparc codes.
    Thanks,
    Li

  • Issue loading itunes store

    I am no longer able to load itunes store.  I tried the steps in the help.  I am not sure what else to try, there are albums I want to buy!
    It tries to connect, but nothing loads.

    Update safari.
    http://support.apple.com/kb/DL1569
    Quit iTunes and try again.

  • TT Issue "9994 Loading data store from disk into RAM in progress"

    Getting this strange issue. Sometimes (2-3 times a day) TT just becomes unavailable and when trying to connect to it getting "9994 Loading data store from disk into RAM in progress".
    Any advise on what the root cause for this behavior might be?

    In all likelihood this is exactly what it sounds like - your datastore is being reloaded from disk into memory. Connections can't be completed until the datastore has gone through recovery and is fully in-memory. You need to look back through your ttmesg.log files and find out why the datastore was taken out of memory in the first place. Possibly there's been a crash and it has been invalidated, meaning it needs to be recovered from the checkpoint files and transaction logs. Or maybe there were no user connections and it was taken out of memory and checkpointed to disk in a normal, controlled fashion. The ttmesg.log files will tell you what happened.

  • Unable to load itunes store on iphone 4S after updating to ios 7

    After I updated my iphone 4S to ios 7, I am unable to load the itunes store on my phone.  It spins like it is loading and then stops, but the screen is blank.  Does anyone know what might cause this?

    Are you talking about the Search screen? If so, it has been hung up for the last 24 hours....undoubtedly server related. I do not have IOS 7 yet, but it is doing the same thing on my iPhone....
    I'm waiting until the weekend to try it again. No point in getting crazy over it.
    Cheers,
    GB

  • ITunes doesn't put music on my iPod, or load the Store. . .

    My iTunes is ridiculous.
    Basically I can't do anything but import music, for the longest time it hasn't been able to put music or anything else on my iPod Touch. So when I had to get a replacement iPod because of a cracked screen and permanent LCD damage, I thought maybe it would fix the problem, because my brother's iPod Nano downloads and syncs music just fine, while mine doesn't do either of those.
    So I came home with my new iPod Touch ready to set it up and load it with songs and podcasts and videos. But since the store won't load I can't access my Apple ID, so I can't set up my iPod.
    So it sits there in the Device Manager section, it just says "iPod Touch", and when you click on it, it has a white screen with "iPod" written in the middle. No options, nothing.
    Same thing if you click "iTunes Store", it pops up, but this time it's just a white screen. And it looks like it's trying to load, with the stripes in the status bar at the top, before it actually loads, then it just stops, and I'm looking at a white page.
    My house does not have Wi-Fi to set up my iPod to see if any of iTunes is functional at all.
    Any ideas?
    I've already tried:
    Uninstalling
    Reinstalling
    Completely Deleting iTunes from my Computer (PC: Windows Vista)
    Downloading Older Versions of iTunes
    Completely Updating Everything, iOS Software, iTunes, QuickTime

    Try to install the latest version of your iTunes and be sure that do a fresh install for that. Apple store works fine.

  • Can't burn cds to library, can't load itunes store, can't recognize ipod

    I downloaded the new version of itunes and now it doesn't work very well....
    1. I could not burn the a brand new cd into my library, the process was stuck "connecting to gracenote"
    2. My itunes store will not load
    3. my ipod is not always recognized by the computer
    How do I fix these problems?  I tried to reinstall itunes, but that didn't seem to work.

    I'm assuming you have already resolved the issue, but if you have not, I would recommend that you uninstall iTunes completely and remove anything related to Apple on your computer including Quicktime. See this post for what you need to remove: http://mismike.blogspot.com/2008/03/itunes-wont-close-on-windows-xp-sp2.html. Good luck.
    -NKA

Maybe you are looking for