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

  • Home
  • SEARCH
  • 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 6214431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:52:31+00:00 2026-05-24T06:52:31+00:00

<mx:TileList id=tl allowMultipleSelection=true> <mx:itemRenderer> <mx:Component> <mx:VBox height=100%width=100% borderSides=borderStyle=solid> <mx:Text id=txt1 text={getText(XML(data))} selectable={_selectable} /> <mx:Script>

  • 0
    <mx:TileList id="tl" allowMultipleSelection="true">             
     <mx:itemRenderer>
       <mx:Component>                       
         <mx:VBox height="100%"width="100%" borderSides="borderStyle="solid">
           <mx:Text id="txt1" text="{getText(XML(data))}" selectable="{_selectable}" />
            <mx:Script>
        <![CDATA[
        import mx.controls.listClasses.IListItemRenderer;

            public override function  set data(obj:Object):void{
            //this override function works alright 
            }   

          private function getText(data:XML):String{
          // some logic inside this function. Works fine. 
          }


    override protected function drawSelectionIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void{
        //this function gives me compile error - "Method marked override must override another method"                          }


           ]]>
        </mx:Script>
        </mx:VBox>
      </mx:Component>
    </mx:itemRenderer>
    </mx:TileList>

Now I know I could make another class and extend tilelist and override this method there and it will work alright, because it will find the method to be overridden in super class’s scope. But I actually want to do this inline at component level (I don’t want to create another file, every time I have to do small modification in a tilelist, datagrid etc).

————————– FULL CODE Prototype (with functions logic not written)———

    <mx:VBox horizontalAlign="center" verticalAlign="middle"> 
    <mx:HorizontalList id="headerList" width="100%" columnCount="7" paddingBottom="0" selectable="false" columnWidth="98" rowHeight="40">
    <mx:dataProvider>
                        <mx:Array>
                        <mx:String>Sunday</mx:String>
                        <mx:String>Monday</mx:String>
                        <mx:String>Tuesday</mx:String>
                        <mx:String>Wednesday</mx:String>
                        <mx:String>Thursday</mx:String>
                        <mx:String>Friday</mx:String>
                        <mx:String>Saturday</mx:String>
                        </mx:Array>
      </mx:dataProvider>
 <mx:itemRenderer>
<mx:Component>
<mx:VBox backgroundAlpha="0.8" height="100%" width="100%" horizontalAlign="center" paddingTop="0" verticalAlign="middle" borderSides="bottom left right" borderStyle="solid">
                            <mx:Label text="{data}" fontWeight="bold"/>
                        </mx:VBox>
                    </mx:Component>
                </mx:itemRenderer>
                </mx:HorizontalList>
                <mx:TileList id="tl" allowMultipleSelection="true" mouseOver="tl.setStyle('backgroundColor','0xFFFFFF')" paddingTop="0" height="100%" width="100%" borderSides="none"  dataProvider="{IndividualData.w.s}" maxRows="4" maxColumns="7" columnCount="7" rowCount="4" rowHeight="110" columnWidth="98">                
                 <mx:Script>
                    <![CDATA[
                        import mx.controls.listClasses.IListItemRenderer;
                        protected override function drawSelectionIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void{
                           return;             
                       }
                   ]]>
                </mx:Script>
                 <mx:itemRenderer>
                    <mx:Component>                      
                        <mx:VBox height="100%" horizontalAlign="center" width="100%" borderSides=" top bottom left right" borderStyle="solid"
                            click="outerDocument.onItemClick(event,XML(data));onEdit()" doubleClickEnabled="true" doubleClick="onScheduleDetail(data.@date)"  
                            verticalAlign="middle" mouseOver="onMouseOver()" mouseOut="onMouseOut()"
                            backgroundColor="{_bgColor}">
                            <mx:Text id="txt1" text="{getText(XML(data))}" selectable="{_selectable}" />
                            <mx:Script>
                            <![CDATA[
                                import mx.controls.listClasses.IListItemRenderer;
                                import mx.core.UIComponent;
                                import com.smartLinx.utils.DateUtils;
                                import com.smartLinx.utils.Helper;
                                import com.smartLinx.utils.DateUtils;
                                import com.smartLinx.ScheduleOptimizer.components.ScheduleDetail;
                                import mx.managers.PopUpManager;
                                [Bindable] private var _bgAlpha:Number;
                                [Bindable] private var _selectable:Boolean;
                                [Bindable] private var _bgColor:uint;       
                                [Bindable] private var _pastDated:Boolean;      

                                /* override protected function drawSelectionIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void
                                {
                                      return;
                                }  */
                                private function getText(data:XML):String
                                    {
                                     //                                 }

                                   private function onMouseOver():void{
                                      }

                                   private function onMouseOut():void{

                                      }  

                                   private function onEdit():void{
                                   }   

                                    public override function  set data(obj:Object):void
                                    {

                                        super.data = obj;                                   
                                    }                                   

                                private function onScheduleDetail(work_date:String):void
                                {
                                }
                                ]]>
                            </mx:Script>
                        </mx:VBox>
                    </mx:Component>
                </mx:itemRenderer>

                </mx:TileList>
            </mx:VBox>  
        </mx:VBox>
  • 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-24T06:52:32+00:00Added an answer on May 24, 2026 at 6:52 am

    Try this:

    <mx:TileList id="tl" allowMultipleSelection="true">             
            <mx:Script>
        <![CDATA[
        import mx.controls.listClasses.IListItemRenderer;
    override protected function drawSelectionIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void{
        //this function gives me compile error - "Method marked override must override another method"                          }
    
    
           ]]>
        </mx:Script>
     <mx:itemRenderer>
       <mx:Component>                       
         <mx:VBox height="100%"width="100%" borderSides="borderStyle="solid">
           <mx:Text id="txt1" text="{getText(XML(data))}" selectable="{_selectable}" />
            <mx:Script>
        <![CDATA[
            public override function  set data(obj:Object):void{
            //this override function works alright 
            }   
           ]]>
        </mx:Script>
        </mx:VBox>
      </mx:Component>
    </mx:itemRenderer>
    </mx:TileList>
    

    In your case you’re trying to override VBox‘s method which is absent.

    Edited after expanding post:

    The Flex Rule #1 which I always follow is:

    Avoid inline MXML components.

    Inline components increase complexity and decrease readability. It can be used only in case of fast prototyping (just simple markup without code) when you definitely know what you’re doing. So you need rich practical skills for that.

    But your code has at least three simptoms to avoid inline components:

    1. It has more than one inline component.
    2. It has ActionScript code for inline components.
    3. The whole MXML class is rather big and complex to read.

    So I suggest you two things:

    1. Get rid of inline components in your current code. Extract components in separate MXML classes.
    2. Do not use them anymore. When you’ll have enough skills you can break this rule wisely 🙂
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm dragging from a TileList to a custom component. I want to know what
I have built a custom component using some containers and a TileList. Now when
I have a TileList with a custom ItemRenderer (IR). The IR can be a
I have a TileList with a custom ItemRenderer, and each item shows an image
I have a tileList component and i was wondering how one might go about
I've got a Tilelist and I'm using an ItemRenderer, which is a Button. I
I'm trying to create a listing of thumbnails using the TileList component, and so
I have a TileList in flex, and need to be able to detect if
In a flex tileList, is there a way to get the cell-address of a
I'm running into an odd issue with itemRenderers inside a TileList. Here is a

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.