how to remove the vertical bar in the listbox

758 views
Skip to first unread message

mars

unread,
Feb 16, 2011, 2:28:57 PM2/16/11
to Google Web Toolkit
i have a list box in my application, but i don't want to show the
vertical scroll bar on the right side, is there any way to remove it?
here is my code:

<g:ListBox visibleItemCount='3' width="15em">
<g:item>Last 7 Days</g:item>
<g:item>Last Week</g:item>
<g:item>Last Month</g:item>
</g:ListBox>


Thanks!

Jan Mostert

unread,
Feb 16, 2011, 4:02:42 PM2/16/11
to google-we...@googlegroups.com, mars
I was going to suggest adding some CSS to it: overflow-y:hidden; but that doesn't appear to work on my side.

The one in the docs is created outside ui:binder and appears to be without the vertical scrollbar 
ListBox.png

Also curious to see a ui:binder workaround for this.



--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Y2i

unread,
Feb 16, 2011, 10:12:58 PM2/16/11
to google-we...@googlegroups.com, mars
overflow is the right property to control scroll bars

overflow: auto; usually is a good choice: it only shows scroll bars when the content is bigger than the frame; otherwise there are no scroll bars.

Fille

unread,
Sep 13, 2012, 11:31:12 AM9/13/12
to google-we...@googlegroups.com
For me the scrollbar dissapears when i use: setVisibleItemCount(int count), to be one more item than the ListBox are holding.

So if you have 10 items in the ListBox, set VisibleItemCount to 11. Not a nice solution, but it seems to work.
Reply all
Reply to author
Forward
0 new messages