I want to protect some objects like buttons, text, progressbar etc.
could you please guide me
Your intention needs to be clearly defined
But, if I were restricting access to a page then the steps might include
1) have a global variable component with an obscure name h3f8t
2) whole procedures and setup were user would enter the password
3) have a global variable component with another obscure name x3j3f
4) in a button that would lead to the said secured page
5) in the touch release event a validation check to see if page change is ok
But this technique is a cheap lock.
Also ineffective is setting the .pw text component attribute to mask with *
Password implies a larger security and this is simply too vague
Step 2 will require you to define and implement a means that the
user can enter such password. This could involve creating a
touch pad keyboard, to triggering an MCU to read an RFID tag.