Hi Rod,

You can extend CellList.Resources interface and create the cell list
with your new Resources.


public interface MyCellListResources extends CellList.Resources {

                @Source("MyCellList.css")
                Style cellListStyle();
        }

and in your MyCellList.css override all of the rules and change what
ever you want:

.cellListWidget {

}

.cellListEvenItem {
  cursor: pointer;
  zoom: 1;
}

.cellListOddItem {
  cursor: pointer;
  zoom: 1;
}

.cellListKeyboardSelectedItem {
  background: red;
<------------------------------------------------------ This is what
you are looking for.
}

@sprite .cellListSelectedItem {
  gwt-image: 'cellListSelectedBackground';
  background-color: #628cd5;
  color: white;
  height: auto;
  overflow: visible;
}


And finally,

CellList.Resources resources = GWT.create(MyCellListResources.class);
CellList<Contact> cellList = new CellList<Contact>(new ContactCell(),
resources);


You should see a red background when you select an item from the
cellist.



On Aug 15, 12:31 am, Rod Trendy <[email protected]> wrote:
> Hello everyone,
>
> I can't help it anymore. I am really stuck on the CellList. Creating
> and working with a CellList is quite simple, but I can't change the
> style of the CellList.
>
> I search the internet via Google but I couldn't find any results that
> 'really' helped me out. I just want to be able to change the
> background color of a selected cell, but whatever I try the color
> won't change from yellow to blue. All I've got so far is changing the
> whole background of the celllist into blue (including the cells which
> are not selected) but that's getting me nowhere.
>
> Please, can anyone help me out? I really would like to have a step by
> step guide for this problem. I am exhausted :(
>
> Regards, Rod

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to