Horizontal scroll bar in Listbox, is it possible ?

443 views
Skip to first unread message

Jean-Philippe Côté

unread,
Mar 20, 2007, 9:53:19 PM3/20/07
to Google-We...@googlegroups.com
Hi,

for my app, I need to put a horizontal scroll bar in a listbox because the elements can have 10 characters to more than 50...

Is it possible to do this in GWT ?

Thanks
--
Jean-Philippe Côte

Sandy McArthur

unread,
Mar 20, 2007, 11:21:22 PM3/20/07
to Google-We...@googlegroups.com
I think you want to use CSS to control the controls width. Create a
plain html file with a sample select box and try tweaking the CSS
until you find what you want and then do that in your GWT app.

On 3/20/07, Jean-Philippe Côté <jean.phili...@gmail.com> wrote:
> Hi,
>
> for my app, I need to put a horizontal scroll bar in a listbox because the
> elements can have 10 characters to more than 50...
>
> Is it possible to do this in GWT ?

--
Sandy McArthur

"He who dares not offend cannot be honest."
- Thomas Paine

Jean-Philippe Côté

unread,
Mar 21, 2007, 12:23:56 PM3/21/07
to Google-We...@googlegroups.com
thanks Sandy,

I tried to use this CSS style, but there is no horizontal scroll.

.wa-listbox {
OVERFLOW: auto;WIDTH: 304px;
background-color: #FF0000;

vs

unread,
Mar 22, 2007, 12:02:40 PM3/22/07
to Google Web Toolkit

My workaround was to put the ListBox in a ScrollPanel. To prevent the
vertical scrollbar from appearing in the ListBox, every time I add an
element to the list I increment the ListBox's visible item count.
This, however, breaks down in the GWT's hosted mode browser -- the
vertical scrollbar appears anyway after I have added about 10
elements. But it seems to work in Firefox and IE.
I'd be really interested to hear if there is a good way to get
horiontal scrolling in a ListBox.

Huy

unread,
Mar 23, 2007, 7:50:48 AM3/23/07
to Google Web Toolkit
Hi,

You can emulate a list box by using a scrollpanel + flow panel +
labels + onclick event.

Regards,
Huy

On Mar 21, 9:53 am, "Jean-Philippe Côté"

Reply all
Reply to author
Forward
0 new messages