I want suggestions in suggestBox that is constructed from TextArea to be shown under the current line in text area, because by default it is shown under the whole text area. How can i implement such functionality?
Looking at the source code of SuggestBox, seems like you'll probably have to implement your own SuggestionDisplay, since the default one uses PopupPanel to show suggestions, which is positioned bellow the suggest box:
// Show the popup under the TextBox.
suggestionPopup.showRelativeTo(positionRelativeTo != null
? positionRelativeTo : suggestBox);
Your implementation could also use a PopupPanel but with a setPostion(x,y)
and show()
instead of showRelativeTo
.