Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4092988
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:33:41+00:00 2026-05-20T19:33:41+00:00

This is an odd one for me but I am also new to Spark.

  • 0

This is an odd one for me but I am also new to Spark. I have a List class with an itemrenderer. How can I get the itemrenderers to divide the List width between them? Normally, I would think this would be a easy as giving the renderers a percent width but that no worky. Any ideas?

Application:

<?xml version="1.0" encoding="utf-8"?>
<s:Application 
    minHeight="600"
    minWidth="955"
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
    <s:ArrayCollection id="dta">
        <fx:Object 
                label="one" />
        <fx:Object 
                label="two" />
        <fx:Object 
                label="three" />
        <fx:Object 
                label="four" />
    </s:ArrayCollection>
</fx:Declarations>

<s:List 
        width="100%"
        borderColor="red"
        dataProvider="{dta}"
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        itemRenderer="ProgressIndicatorItemRenderer">

    <s:layout>
        <s:HorizontalLayout gap="0" />
    </s:layout>
</s:List>
</s:Application>

Itemrenderer:

<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer 
    width="100%"
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    autoDrawBackground="false"
    showsCaret="false">

<s:states>
    <s:State name="normal" />
    <s:State name="selected" />
    <s:State name="done" />
</s:states>

<s:Rect id="progressIndicatorBackground"
        left="0" right="0" top="0" bottom="0">
    <s:fill>
        <s:SolidColor 
                color.done="0xCCCCCC"
                color.normal="0xCCCCCC"
                color.selected="0xF6A139"
                alpha="1" />
    </s:fill>
</s:Rect>

<s:Label 
        width="100%"
        text="{data.label}" />

 </s:ItemRenderer>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T19:33:41+00:00Added an answer on May 20, 2026 at 7:33 pm

    I think you are just missing some properties on the layout itself:

    <s:List width="100%" useVirtualLayout="false" borderColor="red" dataProvider="{ dta }"
        itemRenderer="ProgressIndicatorItemRenderer">
    
        <s:layout>
            <s:HorizontalLayout gap="0" requestedColumnCount="-1" requestedMinColumnCount="-1" variableColumnWidth="true" />
        </s:layout>
    
    </s:List>
    

    Setting the variableColumnWidth to true and useVirtualLayout to false should resolve your problem. RequestedColumnCount and requestedMinColumnCount are set to -1 by default but it’s good to set them explicitly 🙂

    I hope the code above helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Odd one this. I am using NHibernate with one website. I have configured log4net
This may seem like an odd one, but I want to be able to
This can be done in a million ways ... Problem. I have a list
This is an odd one. I added a file to a project, thought I
This is a very odd one and I'm not sure how to proceed. Basically,
Can someone explain to me this odd thing: When in python shell I type
I have been banging my head against the wall with this odd behaviour on
This is odd. I have a Default.png, Default-Landscape.png, Default-Portrait.png and Default@2x.png. The normal default
So, this is odd. In my makefile I have CC:=icc ifeq ($(CC),icc) CFLAGS :=
This is a really odd one. I cannot seem to affect this one image

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.