Incubator ScrollTable how to remove icon right-top corner

4 views
Skip to first unread message

mdwarne

unread,
May 7, 2009, 5:26:40 PM5/7/09
to Google Web Toolkit
Hi,

I'm not sure if this is the right place for incubator questions. I
haven't been able to find the incubator group.

I am using the scroll table from the incubator, it has a small icon
(2 mini arrows pointing left and right).
I would like to remove/hide this icon.

Any ideas?
Thanks,
Mike.


Sumit Chandel

unread,
May 11, 2009, 6:55:06 PM5/11/09
to Google-We...@googlegroups.com
Hi Mike,

A possible solution would be to subclass the PagingOptionsImages image bundle interface and place your own images named the same as the PagingOptionsImages methods in your subclass package. This should replace the standard paging table images with your own (which I think in your case would be blank images).

Alternatively, you could override the methods in the PagingOptionsImages in your subclass and @gwt.resource annotations pointing to images with names of your choice.

Hope that helps,
-Sumit Chandel

jay

unread,
May 14, 2009, 5:50:52 PM5/14/09
to Google Web Toolkit
My solution is this:
1. Create a new CSS class:
.not-displayed {
display: none !important;
}

2. In my PagingScrollTable subclass's ctor:
for ( int index = 0, numWidgets = getWidgetCount(); index <
numWidgets; index++ ) {
Widget widget = getWidget( index );
if ( widget instanceof Image ) {
// Well, we can't remove the widget...AbstractScrollTable
prevents that. So, add a style that
// will cause it to not be displayed...
widget.addStyleName( "not-displayed" );
break;
}
}

I know it's fragile, but having the button just confuses my users.

Please...make sure that when this widget graduates to core that:
1. This button's behavior is configurable
2. The button's presence is configurable

thanks,

jay
Reply all
Reply to author
Forward
0 new messages