The image in question is a screenshot of the following code and style.
public class PeopleBox extends HorizontalPanel implements ValueChangeHandler<String>, KeyDownHandler { SuggestBox inputBox; public PeopleBox() { inputBox = new SuggestBox(getOracle()); this.setStylePrimaryName("peoplebox"); this.addDomHandler(new ClickHandler() { public void onClick(ClickEvent event) { inputBox.getTextBox().setFocus(true); } }, ClickEvent.getType());
Css (I do not use the GWT theme and cannot find a way to style the list of people, so I used the same names as the default GWT):
.peoplebox { background:white; height:37px; padding:0px 4px 0px 4px; border: 1px solid #060b15; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; border-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; margin-right:10px; cursor:text; } .peoplebox-input { border:0px; outline:none; padding:6px; font-size:inherit; } .peoplebox-peopledisplay { background:#060b15; color:#f1f1f1; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; border-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; padding:0xp 2px 0px 2px; height:16px; margin-right:5px; margin-top:5px; } .gwt-SuggestBoxPopup { background:white; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; border-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; border: 1px solid #060b15; } .gwt-SuggestBoxPopup .item { } .gwt-SuggestBoxPopup .item-selected { background:#060b15; color:#f1f1f1; }
source share