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 6083719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:26:10+00:00 2026-05-23T11:26:10+00:00

In a flex project that I have that is designed to scale 100% to

  • 0

In a flex project that I have that is designed to scale 100% to the web window, I have a spark list. And I have a simple itemrenderer that takes the data and displays a name, and a message. Just think of it like a simple instant messenger display. The problem is that for my msg_txt label I want to give it a width thats the width of the parent list thats holding it.

I tried turning the horizontalScrollPolicy to off, also tried width=”{this.parent.parent.width}” (as well as this.parent.width) for the spark label inside the item renderer.

and in the label i tried some things like left=”0″ right=”0″ maxWidth=”{this.width}” but nothing really does the trick.

How can I make this label have a max width of the list thats holding it, AND make sure it resizes if the size of the browser changes and the list size changes?

heres the list:

<s:List id="chat_content" width="100%" height="100%"
                alternatingItemColors="[#EEEEEE,#E6E6E6]" contentBackgroundColor="#EEEEEE"
                horizontalScrollPolicy="off" itemRenderer="renderers.ActiveChatItemRenderer">
        </s:List>

heres the itemrenderer:

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

    <fx:Script>
        <![CDATA[
            import mx.core.FlexGlobals;
            import mx.events.FlexEvent;

            import spark.components.List;

            override public function set data(value:Object):void {
                super.data = value;
                if (data == null)
                    return;

                if(data.systemMsg)
                {

                }
                if(data.name)
                {
                    name_label.text=data.name;
                }
                if(data.icon)
                {

                }
                if(data.msg)
                {
                    msg_txt.text=data.msg;
                }




            }





        ]]>
    </fx:Script>

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

    <s:HGroup id="container" horizontalAlign="left" verticalAlign="top" paddingTop="10" paddingBottom="10">
        <s:VGroup horizontalAlign="center" verticalAlign="middle"
                  width="100">
            <s:Label id="name_label" fontWeight="bold" text="Name: "
                     fontSize="18"/>
        </s:VGroup>
        <s:Label id="msg_txt" text="msg text here" width="{this.parent.parent.width}"/>


    </s:HGroup>

</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-23T11:26:11+00:00Added an answer on May 23, 2026 at 11:26 am

    Did you tried with percentWidth and percentHeight programatically once the itemRenderer has been created ( creationComplete )?

    or

    I haven’t tried next:

    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am starting a web application project that will have an Adobe Flex front-end
So, I have Flex project that loads a Module using the ModuleManager - not
We have a Flex client and a server that is using the Spring/Blazeds project.
I have a list of webservices from a Flex project. I am trying to
I have a project that was compiled with the Flex 3.2 SDK. One of
I have a Flex project that I need to work on that using some
I have a flex project with a mx:Text. i have a class that is
I have a flex project that is made of up several custom components that
I have a Flex/Java web application that uses Maven as a build tool. Currently,
I have an ActionScript only Flex project that was written by someone else. I

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.