Hi Guys!
So I have been creating this calculator, that is composed of a label in the middle with changing values, and increase/decrease buttons on the sides. I have it working to where I click and hold the button, it goes up by 1. How can I make it go up by .01 and show it?
Here is my calculation code
So I have been creating this calculator, that is composed of a label in the middle with changing values, and increase/decrease buttons on the sides. I have it working to where I click and hold the button, it goes up by 1. How can I make it go up by .01 and show it?
Here is my calculation code
B4X:
Sub Timer1_Tick
Dim price,Pounds As Int
price = PriceLabel.Text
If PriceButtonDown Then
If PriceButtonPressed ="Increase" Then
price = price + 1
Else
If price>0 Then
price = price - 1
End If
End If
PriceLabel.Text = price
End If
Pounds = PoundsLabel.Text
If PoundsButtonDown Then
If PoundsButtonPressed ="Increase" Then
Pounds = Pounds + 1
Else
If Pounds>0 Then
Pounds = Pounds - 1
End If
End If
PoundsLabel.Text = Pounds
End If
End Sub