is it possible to display an icon inside a DropdownButton (for each element)? I'm new to gwt-bootsrap and don't know how to do. I use gwt-bootstrap-2.0.4.0.

有帮助吗?

解决方案 2

I found the answer! I used NavLink what was the wrong component. It works with NavWidget

<b:DropdownButton text="Foo">
<b:NavWidget>
    <g:HorizontalPanel>
        <g:Image resource="{res.fooBarPicture}" />
        <g:HTMLPanel>Bar</g:HTMLPanel>
    </g:HorizontalPanel>
</b:NavWidget>

其他提示

If you only want to have Icons/images in the dropdown, I think if found what you need. If you need text I don't know if it will also work. Look here: GWT Drop Down Menu with images

If you need also Text you could look here. But this is with SmartGwt so you probably won't like it.

Sarajog

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top