cayres
03-10-2008, 08:27 AM
Hi,
I have a scrollable list, with more items than shownitems, so we have a scrollbar. So far so good. When the user clicks an item in the list I'd like to display a little dropdown list of options at the position of the clicked item. I'm doing this in the onclick handler for the replicated textlistitem. This works fine if the list has not been scrolled - the 'y' value of the textlistitem gives its position on the screen. However if the list has been scrolled, the y-value of the textlistitem is its distance from the top of the list - a value that can be much greater than the height of the list and of the canvas. And the y-position of the parent (i.e. the list itself) is still zero. Is there a way to determine the actual position of a listitem relative to the -visible- part of the list? Thanks in advance,
Charles
I have a scrollable list, with more items than shownitems, so we have a scrollbar. So far so good. When the user clicks an item in the list I'd like to display a little dropdown list of options at the position of the clicked item. I'm doing this in the onclick handler for the replicated textlistitem. This works fine if the list has not been scrolled - the 'y' value of the textlistitem gives its position on the screen. However if the list has been scrolled, the y-value of the textlistitem is its distance from the top of the list - a value that can be much greater than the height of the list and of the canvas. And the y-position of the parent (i.e. the list itself) is still zero. Is there a way to determine the actual position of a listitem relative to the -visible- part of the list? Thanks in advance,
Charles