Saving "TextField" data from a "Keyboard Event" (with "errors filters") is ignored #3940
-
Hello, I have an application with an "IconButton" to save data from different TextFileds. Before saving any data I have code to inform errors (for example putting only 1 char to avoid fields with only 1 character) and then, simply, cheking if different TextFields have an error:
Just doing this I'm capable to filter 1 character fields avoiding to save wrong data. The problem comes when I want a keys combination like (Ctrl+S) to emule the same (a click on the save "IconButton"). I tried to put the focus out (on the "IconButton") before doing the same, but the sata is saved ignoring the 1 character restrictions. Is like putting firts the focus on another "Control" to check the errors was completly ignored. Somebody with some idea? Thank you very much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I would like to help but without entire code it won't be that helpful. Could you provide entire code? |
Beta Was this translation helpful? Give feedback.
I think you problem is solved but want you to review it. I added two extra functions,
validate_textfield
andother_events
one to validate textfield input and another one so whenTextField
changes or loses focus.