Hello!
Hi guys ,
Introduction
In this GUIDE we will be learning how to restrict some letters like special
characters in the Text-box.
First, we will be using an extension called TaifunText-Box by Taifun.
Because there is no event block called âOnTextChangedâ listener block in
Niotron and so I request Developers to add this block in the upcoming update.
What is Text-Box?
You can go to this link to understand what is a Text-Box
Link - User Interface
Designer Tab
#1
Here I have done a simple design with three components, theyâre : -
- Text-Box
- TaifunText-Box extension
- Notifier
#2
- Text-Box - Taken for restricting some letters/symbols/anything.
- TaifunText-box - For using âOnTextChangedâ event block.
- Notifier - A notifier to show alert message if user enters any special characters.
Blocks Editor
#1
There are some ways to follow to block special characters, we will learn them one by one.
#2
Fist we will initialize all the special charters or any charters which you donât want user to enter in a Tet-box in a list of a variable.
#3
When the screen initialize, we will start a TextChangedListner for the textbox which you want to block any characters from TaifunText-Box extension.
#4
We will take a event block called AfterTextChanged from Taifun extension.
First we will check if the last word of the Text-box text, if the segment is in the list of the variable then we will remove that last letter of the Text-box and show alert message that âPlease do not include any special charactersâ.
Downloads
- AIA File - Guide.aia (19.8 KB)
- Extension - App Inventor Extensions: Textbox | Pura Vida Apps
Request
- A request to Niotron developers to add on AfterTextChanged event block.
Credits
- Text-box extension by Taifun
- Niotron Developers for builder/creator and Moderators for community.
Ending
- Hope you enjoyed and learnt something new in this topic!
- Feel free to contact me via Email - [email protected] or you can
just PM me. - Any suggestions or improvement to this topic will be appreciated, you can just say me, Iâll update it.
Xoma
Email me - [email protected] or PM me.
Graphic Designer,
Happy Niotroning
Regards,