I want do if textbox 1 entered word equal to label2 then write "Entered word is the same language"
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
Blocks are here
your blocks look fine, so set uyan visible = true means, the text "Entered word is the same language" will be displayed, correct?
use Do it to debug them, see also tip 4 here
probably a trailing spaces problem?
try to use the trim block http://appinventor.mit. edu/explore/ai2/support/ blocks/text.html#trim
trim
Removes any spaces leading or trailing the input string and returns the result.
You never reset the visibility of your error message to invisible.
There are three different ways to fix this
(you still should do the trim() fix in the other post)
- Use a Notifier for your error message, with an OK button.
- Add a Clock to clear the message after a couple of seconds
- In the post-translate block, replace the if-then test block with a direct assignment into the visibility attribute of the error message: Message.Visible = (trim(Your_top_word) text= trim(Your bottom_word)). This will both set and reset the visibility as needed. Drop the if-then wrapper.
Thank you for your help :) Abrham and Taifun I fix it with notifier :)
댓글 없음:
댓글 쓰기