| Chapter 3- Data Types and Operators | Boolean Expressions Page 2 3 4 |
| The If Statement Page 2 3 4 5 6 7 8 9 | |
| Arithmetic Operations Page 2 3 4 5 6 | Boolean Operators and Nested If Statements Page 2 3 4 5 6 7 |
| Events and Sequential Processing Page 2 3 4 5 | More Examples Page 2 3 4 5 6 7 8 9 10 11 12 |
| Datatypes and Conversions Page 2 3 4 5 6 7 | Using Check Box and Option Controls Page 2 3 4 5 6 7 8 9 10 |
| Variable Declarations - Local and Global Page 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Exercises Page 2 3 4 5 6 7 8 |
| Chapter 4- Selection Statements | Review Questions |
| Introduction | |
4-7: Check Box and Option Controls
Exercise 4-6: Global Classics Cinema continued ...
You should now be able to program the CheckedChanged event for the adult tickets checkbox.
A few more hints:
Next we should consider how to code the plus and minus command buttons. Their behaviour is not much different from the checkbox event; they should increase or decrease the adultQty variable and recalculate the adultCost and totalCost variables, displaying these new values in the appropriate textboxes.
In addition, however, if the minus button decreases the quantity to 0 the controls should be made invisible and the checkbox itself should be unchecked. Presumably in this case, i.e. the user decreased the quantity of tickets from 1 to 0, they have decided that in fact they don't want any adult tickets.
You should be able to implement the _Click events for these two command buttons now.