How do you add "1" when you press the same image?

Hello. How do you add "1", which is a number, when you press the same image over and over again?

add 1 to what/where?

Use one variable to catch the clicked image or component

When any image clicked
If get component = get global variable
Then store the value as 1 as you like anywhere
Else set global variable to get component

Edit:
you havent asked proerly.. Based on your last reply it seems you are in need of increment ..
so just follow Steve suggestion.. Suppose if you want to continue to add numbers on next time while opening the app, just use tinydb..

Each image needs a text value to identify it, like a file name or something you associate with the file name in a lookup table.

Keep your counts in a TinyDB Namespace, with tag=name and value=count (default 0).

I meant add “1” to a textbox when you click on an image. I’ll also try to add a image a few hours later.

Perhaps

addTBox

is what you want to do. The code snippet adds 1 to the TextBox every time the Blue arrow image is clicked.

Ok thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.