Button to add +1 to textbox

Ksmith1192

Member
Licensed User
Longtime User
Hi guys,

I have a couple buttons that I need to add +1 to an edittext. But every time I press the + button, it just adds one and doesn't add any more. I need it to go up to 100.
B4X:
Dim Cows As Float
Sub Button1_Click
   edittext1.Text = Cows + Cows + 1
End Sub
 

Ksmith1192

Member
Licensed User
Longtime User
Numberformat

Thank you!

I do have another question though. How do I get it to where the edittext box has no decimal places. Just whole numbers? I know its something with numberformat() but how would I go about implementing it
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…