Minus Button Help

Hello! Please help me fix this.

I have a button here. I set it to false if there is no any product yet. But after picking, I set it to true.

But when the the number becomes 0, it will be disabled so that it will not be -1, -2, and so on since I am using these buttons to pick how many items I want to add in my cart

But when I click the plus button, the minus button is still disabled. I want to the minus button if the number is bigger than 0 and just enabled it when it becomes 0. How can I fix it?

This is my blocks:

In btnPlus.click enable also the btnMinus

1 Like

You can avoid the whole enable/disable issue by using this formula for the minus button:

set label.Quantity.text to max(0, (labelQuantity.Text - 1))

That never lets the quantity go below 0.

2 Likes