HI,
I have a very sample testing APP attached here.
When I enter 99 in the TextBox1, and then tapped TextBox2,
the TextBox2 will become disabled, and then
I requested TextBox1 to be focused again to let user to correct the number input (Only > 100 is allowed).
The weird thing happened that TextBox1 become disabled, and I can't delete the original number nor change them. P.S.: When TextBo1 re-focused again by the code, App brought up a Full keyboard, not the number only.
Maybe I didn't say it clearly.
I intentionally to enter 99 in the textBox1, so the warning message will be triggered.
After App Inventor re-focus on textBox1, the text become "uneditable"!
So, I was suspecting there's a bug in App Inventor.
We can't see your blocks in the GotFocus event, so we can't see what happens when the TexBox regains focus... So I still say it's a logic error in your program, or a lack of additional logic.
I didn't have a GotFocus event on TextBox1. That's all the blocks I have in the thread.
Please try the new1.aia file and you will see what happened on the TextBox1.
After regain focused, it can't be altered.
Thanks for your quick reply! I will give your code a try.
Regarding my code above, why when TextBox1 regain focused, it couldn't be altered?
I would like to know the reason why? If you know, please let me know.
Some kind of bug, both textboxes end up having focus which seemed to disable both from any data entry (even without using the "enabled" true/false blocks)
Blockquote
Some kind of bug, both textboxes end up having focus which seemed to disable both from any data entry (even without using the "enabled" true/false blocks)
Right...after TextBox1 regain focused, not only it can't be edited, but the keyboard showing a full keyboard, not number_only keyboard (Originally defined as numbers only).
A little delay with a timer also helps. These blocks work. Switching focus too quickly causes TextBox2 to still have focus, even though TextBox1 looks like it has focus.