Hi,
I'm using a TileGrid that consist of two DetailViewerField (icon, and name of the icon). The purpose of the TileGrid is to display all the icons to the user. The functionality I wish to achieve is to change the icon when the user is a mouses over a tile. I haven't been able to figure out how to grab the Tile associated with the mouseover.
How can I access the Record that is associated with the tile the user has hovered over?
Thanks
I'm using a TileGrid that consist of two DetailViewerField (icon, and name of the icon). The purpose of the TileGrid is to display all the icons to the user. The functionality I wish to achieve is to change the icon when the user is a mouses over a tile. I haven't been able to figure out how to grab the Tile associated with the mouseover.
Code:
final TileGrid tileGrid = new TileGrid();
DetailViewerField iconField = new DetailViewerField("icon");
iconField.setType("image");
iconField.setImageSize(64);
DetailViewerField nameField = new DetailViewerField("name");
tileGrid.setFields(iconField, nameField);
tileGrid.addMouseOverHandler(new MouseOverHandler()
{
@Override
public void onMouseOver(MouseOverEvent event) {
//HOW TO ACCESS MOUSED-OVERED TILE, SO THAT I CAN CHANGE THE ICON?
}
});
Thanks
Comment