Setting text field maximum character

0 views
Skip to first unread message

subbu

unread,
Jul 1, 2009, 7:50:35 AM7/1/09
to GWT-Ext Developer Forum
Hi all,
I am using a gwt ext text field in my application.But i can not
set the maximum character,i have set it to 2 even after that i can add
more than 2 character.This is my code.

final TextField hourTextField = new TextField();
int hour = new Date().getHours();
String hourtext = String.valueOf(hour);
hourTextField.setMaxLength(2);
hourTextField.setMaxLengthText("Maxlength exceeds");
hourTextField.setWidth(23);
hourTextField.setValue(hourtext);

Thanks and Regards,

Subash k .s

Patrizio De Michele

unread,
Jul 1, 2009, 8:05:23 AM7/1/09
to gwt...@googlegroups.com
try to see DateField...
bye pat

2009/7/1 subbu <subashka...@gmail.com>
Reply all
Reply to author
Forward
0 new messages