• Post Reply Bookmark Topic Watch Topic
  • New Topic

To limit no of character (30) in SuggestBox  RSS feed

 
Harshal Gurav
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have one SuggestBox populating data from database. also user can manually add text into the same.
I want to restrict no of character in SuggestBox is 30.


I used the method
suggestbox.getTextBox() method but no avaliable method are available like setmaxlength() or like

Any suggestion is highly aapreciated
.
Regards
Haresh
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
suggestbox.getTextBox() returns you a TextBoxBase. Maybe you can try casting it to TextBox and then invoking setMaxLength() on it
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!