0

I want to add a SimpleButton to a list item in a list component. I am getting the CellRenderer for the list item I want and using the addChild method to add the simple button. The button appears in the right spot on the list item but it doesn't function like a button. It's like the contents of the buttons first frame is added to the CellRenderer and nothing else.

Anyone have an idea what might be going on?

Jordan
  • 1,233
  • 2
  • 12
  • 32
  • Why do you want to add a button to a list component? A list component already has the user interactions like mouseover, mouseout, isn't it? What extra do you want to get from the buttons-in-a-list solution? And adding it as a child might work differently as expected in this case. List is a component and adding a child might not add it as an item of it. – anemgyenge Apr 23 '11 at 00:48
  • The button will be used to remove the list item ( CellRenderer ) instance from the list. I'm tying to add the button to a list item, not the list itself. – Jordan Apr 23 '11 at 00:59
  • By all means do NOT post any code. I would rather keep guessing. I for one love to waste time guessing on something then being productive – The_asMan Apr 23 '11 at 01:42
  • So you want something like x-TEXT and if the user presses x it would remove the item from the list? I'm not sure, but aren't there different built-in components too? Like a tile list or something component where you can easily attach movieclips. Then just create the "line" as you wish. And make the tilelist a 1xn matrix. Would this help? – anemgyenge Apr 23 '11 at 01:48
  • 1
    @The_asMan what I explained, explains the code I am using. I call the addchild method on the cellrenderer class to add a button to it and its not working. an example of code is not needed because its very simple. Sorry it takes thinking to solve my question. speaking of productivity... simply saying "please give a code example" is more productive than being an asshat about it and posting sarcastic comments attempting to boost your obviously low self esteem while trying to sound smart, is the opposite of productive. if you don't have anything helpful to say please gtfo my SO. Thanks – Jordan Apr 23 '11 at 08:34
  • @anemgyyenge I have not worked with the tile list component. I will have a look at it Monday at the latest and get back to you about what I find out. Thank you for your suggestion! – Jordan Apr 23 '11 at 08:38

1 Answers1

0

Setting the mouseChildren property of the fl.controls.listClasses.CellRenderer class to true fixes this problem.

Jordan
  • 1,233
  • 2
  • 12
  • 32