0

change images in gridcell when focused on

Hello all,

I have created a grid containing several gridcells. Every gridcell displays the "icon_small" image. I would like to achieve the following:
When the end-user moves to a given gridcell using the remote control, the selected gridcell displays the "icon_big" image.
When the end-user moves to the next gridcell, the previous gridcell displays "icon_small" and the newly selected gridcell displays "icon_big".
etc...

So basically what I want is when I focus on one gridcell, the image changes to another. And when I focus on other cells, the image previous will change back and the current image will change.

I know that I can use onFocus function to change image when the gridcell is focused on. But I don't know how to change it back when it focus on other gridcell.

Any advise would be appreciated
Many thanks in advance

by
  • fo
  • Dec 9, 2009
4 Replies
  • Well onBlur is usually the opposite event for the onFocus event. So use that to switch the image back.
    0
  • QUOTE (Mike R. @ Dec 9 2009, 09:12 AM) <{POST_SNAPBACK}>
    Well onBlur is usually the opposite event for the onFocus event. So use that to switch the image back.


    Thanks very much for your help. It works!
    0
  • Hey fo,

    Can u put some sample code here, i need to do the same but it is not working in my case?

    Thanks in advance

    0
  • Hi Afshan,

    It should work as fo/Mike mentioned. Please post your code here, I can probably take a look and find the issue.

    Thanks, Vivek

    0

Recent Posts

in General - Yahoo! TV Widgets