Thursday, October 28, 2010

Re: CellList - setting selected item background

I hade similar problem and I have solved it by calling:
StylledListResources.INSTANCE.cellListStyle().ensureInjected();

my overrided resources look like this:

public interface StylledListResources extends CellList.Resources {

final static StylledListResources INSTANCE =
GWT.create(StylledListResources.class);

/**
* the overrided styles
*/
@Source("FaplCellList.css")
Style cellListStyle();
}

hth

On Oct 28, 6:56 pm, gruchapaul <gruchap...@gmail.com> wrote:
> Hello, I'm trying to set background to selected item in CellList.
> Default it's ugly yellow and I want it to be like on GWT Showcase.
> This is the way i'm doing this
>
> public interface Resources extends CellList.Resources {
>        public static final Resources INSTANCE =
> GWT.create(Resources.class);
>
>        @Source("aaa.png")
>        ImageResource buzz();
>
>        @Source("aa2.png")
>        ImageResource buzz2();
>
>        @Override
>        @Source("cellBg.png")
>        public ImageResource cellListSelectedBackground();
>
> }
>
> ....
> class MyMenu...{
> ...
> CellList<String> cellList_2 = new CellList<String>(new
> TextCell(),Resources.INSTANCE);
> ...}
>
> And nothing has changed. What's wrong?

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

No comments:

Post a Comment