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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:32:32+00:00 2026-05-19T09:32:32+00:00

I am trying to make a generic list control that has x buttons in

  • 0

I am trying to make a generic list control that has x buttons in it so that users can remove items from the list by clicking the x button. However, this list control needs to support item renderers while still standardizing the layout of items placed next to x buttons.

So I figure the best approach would be to extend the list control and use a renderer that draws the x button and combines that with what ever renderer the user supplies. Unfortunately I cannot figure out how to do that.

I tried overriding newInstance method from the IFactory interface and used that to create an HBox that contains my button and inserts the newInstance result from a user supplied renderer, however it wasn’t complete. It displayed as I expected, but the mouse over effect only worked on the user supplied renderer portion and not the entire HBox that my custom renderer made.

There seems to be a lot of missing details in the Flex documentation on this subject.

I am making all of this in Action Script 3.

  • 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-19T09:32:32+00:00Added an answer on May 19, 2026 at 9:32 am

    I found the easiest solution was to just use a data grid and an item renderer for the last column. I extended the advanced data grid to make a “EditabledList” class, and I modified the “public function set columns” method to automatically add my remove button column to the end. Then I made a remove button item renderer for that column. Binding the click action was a little tricky since I only had a reference to the data for that row and not a reference to the list. I got around that by overriding the “public set dataProvider” method to replace each items in the list with my own custom object that has the reference to the list, a unique id, and a “removeMe” method. I called this object an EditableListItem. The unfortunate side effect is that data binds must be prefixed with an extra “.data” since the user’s objects are stored in the “data” property of my EditableListItem’s.

    This is what my renderer looks like.

    <fx:Component className="buttonRenderer">
        <s:MXAdvancedDataGridItemRenderer height="100%" width="100%">
            <s:Button left="5" top="5" skinClass="{buttonSkin}" click="EditableList.clickButton(data)"
                useHandCursor="true" buttonMode="true" toolTip="Remove item"/>
        </s:MXAdvancedDataGridItemRenderer>
    </fx:Component>
    

    The buttonSkin just rendered a custom image with roll over effects.

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

Sidebar

Related Questions

Trying to make a make generic select control that I can dynamically add elements
I'm trying to make a context menu for a control that is linked to
I am trying to make a JTable that has column spans available. Specifically, I
I'm trying to make a generic function taking a variable argument list. A part
I'm trying to make sense of the RadWindow/RadWindowManager relation. I see that there can
I'm trying to make a button in Flash Builder 4.5 that is multi-lined (specific
Trying to make a generic PL/SQL procedure to export data in specific XML format,
I am trying to make a div, that when you click it turns into
I am trying to create a generic list class for use with tiOPF (an
I am trying to make an extension method that will shuffle the contents of

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.