S Smee Well-Known Member Licensed User Longtime User Jan 21, 2012 #1 Is there a way to show the keypad in uppercase letters only? i have tried this method posted by Erel but it does not seem to work. No matter what number i plug in http://www.b4x.com/forum/basic4android-updates-questions/9799-edittext-capitalization.html#post54300 This is the code i tried to test it with Code: Copy Sub etProdCode_FocusChanged (HasFocus As Boolean) Log(etProdCode.InputType) etProdCode.InputType= Bit.Or(etProdCode.INPUT_TYPE_TEXT, 8192) Log(etProdCode.InputType) If HasFocus =True Then etProdCode.Text="" End If End Sub the log results are 1) 524289 2) 8193 Any ideas? Last edited: Jan 21, 2012
Is there a way to show the keypad in uppercase letters only? i have tried this method posted by Erel but it does not seem to work. No matter what number i plug in http://www.b4x.com/forum/basic4android-updates-questions/9799-edittext-capitalization.html#post54300 This is the code i tried to test it with Code: Copy Sub etProdCode_FocusChanged (HasFocus As Boolean) Log(etProdCode.InputType) etProdCode.InputType= Bit.Or(etProdCode.INPUT_TYPE_TEXT, 8192) Log(etProdCode.InputType) If HasFocus =True Then etProdCode.Text="" End If End Sub the log results are 1) 524289 2) 8193 Any ideas?
klaus Expert Licensed User Longtime User Jan 21, 2012 #2 You should use: Code: Copy etProdCode.InputType = Bit.Or(Edt.INPUT_TYPE_TEXT, 4096) 8192 sets only the first character of a word to capiltal. You could have a look here. Best regards. Upvote 0
You should use: Code: Copy etProdCode.InputType = Bit.Or(Edt.INPUT_TYPE_TEXT, 4096) 8192 sets only the first character of a word to capiltal. You could have a look here. Best regards.
S Smee Well-Known Member Licensed User Longtime User Jan 21, 2012 #3 Thanks Klaus I did lookup those codes and tried many of them. 8192 was the last one that i had tried I was actually using 4096 public static final int TYPE_TEXT_FLAG_CAP_CHARACTERS Since: API Level 3 Flag for TYPE_CLASS_TEXT: capitalize all characters. Overrides TYPE_TEXT_FLAG_CAP_WORDS and TYPE_TEXT_FLAG_CAP_SENTENCES. This value is explicitly defined to be the same as CAP_MODE_CHARACTERS. Constant Value: 4096 (0x00001000) Click to expand... Upvote 0
Thanks Klaus I did lookup those codes and tried many of them. 8192 was the last one that i had tried I was actually using 4096 public static final int TYPE_TEXT_FLAG_CAP_CHARACTERS Since: API Level 3 Flag for TYPE_CLASS_TEXT: capitalize all characters. Overrides TYPE_TEXT_FLAG_CAP_WORDS and TYPE_TEXT_FLAG_CAP_SENTENCES. This value is explicitly defined to be the same as CAP_MODE_CHARACTERS. Constant Value: 4096 (0x00001000) Click to expand...
S Smee Well-Known Member Licensed User Longtime User Jan 21, 2012 #4 Sorry Klaus it is working. I had mistakenely initialised the text box earlier which seems to have stopped it working properly Edit: As an aside how do you add 2 of them together would it be anded or ored? or just add the 2 values Joe Last edited: Jan 21, 2012 Upvote 0
Sorry Klaus it is working. I had mistakenely initialised the text box earlier which seems to have stopped it working properly Edit: As an aside how do you add 2 of them together would it be anded or ored? or just add the 2 values Joe