tags:

views:

19

answers:

2

I put a ListBox into a tabele cell an want it to ocupy the whole cell (width="100% height="100%") and show as many rows as possible but:

  • not specifyng setVisibleItemCount causes to show a big dropdownbox (i want a list)
  • specifying setVisibleCout makes listbox to ignore height (it takes as much place as it needet to exacly display n rows)

i there a workaround ? (in Swing a number of wisible rows ia a funcion of height and I'd like it this way in gwt).

Thanks in advance

A: 

ListBox is a native GWT component, and that's the way it works. If you're using GWT 2.1 you can create your own CellRenderer

Carlos Tasada
Can I use any other widget ?
lbownik
@Ibownik That really depends of what you want to do. As I said, in GWT 2.1 you have the new Cell Widgets.If you don't want or cannot upgrade, then I would suggest you to create your own using a VerticalPanel or another FlexTable
Carlos Tasada
A: 

You could approximate a solution by calculating how many items should be shown based on the height you want.

Riley