placing widget in listbox/dropdown in gwt

点点圈 提交于 2019-12-23 23:15:19

问题


i am using gwt to build my web site. i would like to create a dropdown/listbox that contains no just text but also images, meaning that in the drop down there will be a what ever widget that ill create.

please advise jaimon


回答1:


You won't be able to do this with a ListBox, because it just creates an HTML < select> element.

You can use a MenuBar that has one menu with MenuItems in it to simulate a dropdown with complex widgets inside it. You will also be able to style the dropdown rather than rely on browser-styled form elements.




回答2:


Take a look at the Combobox or Suggestion box in Advanced GWT Components.




回答3:


Another widget is the DropDownListBox in the GWT incubator. I have not used it, but the stated intent is to provide a rich, stylable ListBox. You can pass raw HTML to the addItem() method.

DropDownListBox




回答4:


it is possible to use Tree inside ScrollPanel, without using nested items Tree allows TreeItem to be a Widget



来源:https://stackoverflow.com/questions/1766842/placing-widget-in-listbox-dropdown-in-gwt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!