开发者

How to set single selection for GWT multiselect Listbox?

I created multiselect Listbox (with parametr true in constructor). How to set him single select mode with m开发者_开发百科ulti select View (It looks like multi select but I can select only 1 record )?

Thanks


The documentation warns about using setMultipleSelect on InternetExplorer not working, so it may be best to recreate the widget to use false in the constructor. But, on other browsers, this should work:

listBox.setMultipleSelect(false); //single select mode
listBox.setVisibleItemCount(10); //the parameter is the number of rows you want to be visisble.

Again, I think the recommended way would be to create a new ListBox and re-add it, to avoid failure on IE6.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜