-
15 Dec 2008 10:19 AM #1
TextField to UPPERCASE ?
TextField to UPPERCASE ?
is there a way to set all content of an TextField to UPPER CASE?
-
15 Dec 2008 10:47 AM #2
-
15 Dec 2008 12:11 PM #3
Add this property: style:{textTransform: 'uppercase'}"
-
16 Dec 2008 2:46 AM #4
this doesn't work...
I need an method getValue that return the value as UPPER CASE
for example:
method getValue changed:Code:TextField<String> textField = new TextField<String>(); textField.setUpperCase(true);
Code:public T getValue() { if(t instanceof String) { String s = (String) t; return isUpperCase ? s.toUpperCase() : s; } /.... ..../ }
-
16 Dec 2008 3:49 AM #5
I dont get the problem here. So implement your own TextField widget or just overwrite the method which u already have mentioned....
btw. in your code i do not know why u are checkin the string? just set it. you want it uppercase so it doesnt matter if it is already.Code:TextField<String> textField = new TextField<String>(){ @Override public String getValue() { return super.getValue().toUpperCase(); } };
and inheriet from the normal one... overwrite the getter or even the setter method with your uppercase stuff or do it your way that u can decide the set a FLAG. This is some function what u can easily set by urself...
Your post does not clarify what you want to gain exactly ....
You want to have the Value just set UPPERcase or already the INPUT? so when u are typing thats automaticly UPPERCASE??
-
16 Dec 2008 5:40 AM #6
thanks man...
but I alredy know all u talking about...
I was just wondering if this could be developed... This change will be very useful and very easy!
Is just an verification!
Frankly, I don't have time to make this changes... =\
Im my example
set the field to show and return text in Upper Case..Code:textField.setUpperCase(true);
This getValue override the original and check if the field is true to UpperCase
yes = return string upper case
no = default = return the string
-
13 Jan 2009 9:12 AM #7
-
18 Jun 2010 4:06 AM #8
-
22 Jun 2010 1:59 AM #9
-
8 Jul 2011 11:54 AM #10
Settings the style attribute did not work for me. The result I would like is that whatever the user types is always shown to them as uppercase.


Reply With Quote
