Disable SuggestionBox

140 views
Skip to first unread message

Charan

unread,
Aug 22, 2008, 5:06:49 AM8/22/08
to Google Web Toolkit
hi,

I want to know how can we disable SuggestBox , this is not supporting
either setEnabled() or setReadOnly() methods.

is there any in direct way to achieve this.

Thanks in advance

regards
Charan

joseanquiles

unread,
Aug 22, 2008, 12:28:45 PM8/22/08
to Google Web Toolkit
Try:

public static void setEnabled(SuggestBox sb,boolean enabled) {
DOM.setElementPropertyBoolean(sb.getElement(), "disabled", !
enabled);
}


Regards,

José Antonio

walden

unread,
Aug 25, 2008, 7:41:58 AM8/25/08
to Google Web Toolkit
You can also pass in your own TextBox when you construct the SB:

TextBox tb = new TextBox();
SuggestBox sb = new SuggestBox(oracle, tb);

...and later disable the TextBox:

tb.setEnabled(false);
Reply all
Reply to author
Forward
0 new messages