It occurred to me to try adding the context menu to the item renderer,
but I wasn't sure what would happen to the "blank" areas of the
TileList, like if there aren't enough data items to fill the entire
space... does the list get item renderers with data=null, or are there
only renderers where there's actually data? (Trial and error would
answer that, I guess...)

I do still need the individual components of the item renderer to be
separately clickable - as I mentioned in another reply, I want to do
something special when the user clicks on the corner of the embedded
image controls.

Thanks for your help! More experimentation to come...

--Tracey

--- In [email protected], "andrewalderson650" <[EMAIL PROTECTED]>
wrote:
>
> If you are using a custom item renderer why aren't you just adding 
> the context menu to the item renderer? 
> 
>  As a note if you are extending one of the default item renderers 
> they have the mouse disabled in the constructor so this needs to be 
> fixed.
> 
> --- In [email protected], "tsiesser" <tsiesser@> wrote:
> >
> > I'm hoping someone's had experience with this one... I have a 
> TileList
> > control with a custom itemRenderer. The renderer consists of an 
> Image
> > control and a few Label controls. 
> > 
> > I've also attached a custom context menu to the TileList. In the
> > MENU_SELECT event, I want to set the TileList's selectedItem to the
> > item that the mouse is over before popping up the context menu. So I
> > examine the event.mouseTarget property... this might be one of the
> > embedded Label controls, so I crawl up the parent property till I 
> get
> > to the top. Works great - I eventually get to the itemRenderer 
> level,
> > where I can check if the renderer.data value is already selected, 
> and
> > if not, select it.
> > 
> > It *doesn't* work if I right-click on the Image control. In that 
> case,
> > mouseTarget comes back as a MovieClip object with its parent 
> property
> > set to null - there doesn't seem to be any way to determine which
> > itemRenderer it belongs to!
> > 
> > Any ideas? All help appreciated, as always!!!
> > 
> > --Tracey
> >
>


Reply via email to