Radio buttons are a commonly used feature in most program and websites, these enable the users to make a selection from a possible number of selections, however it is limited to only enabling them to have one choice at a time, so for example the option of a drink for a person in a fastfood resturant would be,
The option of one of this is required as the person is not likely going to want a mixture of all these drinks. A more common and obvious demonstration of this
would be Male or Female and Smoker or non smoker.
The example below describes an option of an item of clothing that is of medium price being selected, this triggers a number of things to happen, the first is that
the number that the user has input in to the quantity text box (Qtychosen) is assigned to a variable dqty on line ①
The next line then assigns the result of the value set in
dmediumprice and multiplys this by the value in dqty and then adds the value set in the variable dpostpack on line ②
The next line then takes the value that is now stored in the dteeprice variable and converts it to a string using Str and outputs this in to the textbox TeePriceBox
by using the .text function at the end of the objects name on line ③.
The next line then takes the value now placed in the textbox and changes the format to a currency on line ④
The next line takes the value stored in the variable dteeprice and adds the assigned value of dgiftprice and assigns it to the variable of dtotalprice ⑤
The value now stored in dtotalprice is then made in to a string on line ⑥ and then attached to the TotalPriceBox text box by using .text
Finaly on line ⑦ the value of the textbox TotalPriceBox is formated to a currency
This instance of a radio button could be simply copied and reused by a user if there were other options within the radio button selection, just as long as the links to the global variables and changed to link to the correct options.
The use of global declarations are key in programming as this will enable modules of seperate code to refer to them without knowing that others also link to them. These are usually found in the uppermost part of the coding area. This could be useful when creating programs like calculators where the value for Pi (π) could be declaired globally so that other operators can access it.
What is the #
5 min's
In some programs users are enabled with the ability to add a file to a system, this could be to upload a document relating to a specific user in a
database or it could be to enable the user to customise a design for a product like a tee-shirt where a they can add there own images.
The feature will require a number of different tools from our tool box.
EXTENTION
Using the graphic editor of your choice create 5 tee shirt images that use the following a there most dominant colour
1. Red
2. White
3. Green
4. Blue
5. Black
EXTENTION
Make your images professional by adding additional detail to them
STRETCH & CHALLENGE
The information covered in this page covers the knowledge and understanding linked to the criterion in the table below.
Links to Assessment Criteria | Description |
---|---|
LO1 |
Understand the features of event driven programming: Key features: service oriented; time driven; event handlers; trigger functions; events eg mouse, keyboard, HTML object, form, user interface; event loops; flexibility; suitability for graphical interfaces; simplicity of programming; ease of development |
LO2 |
Be able to use the tools and techniques of an event driven language: Triggers: eg key press, alarm, system event, touch screen event, mouse click Tools and techniques: eg use of tool boxes and controls, selection, loops, event handlers, triggers, objects and object properties, menus; debugging tools Variables: declaring variables; scope of variables; constants; data types |
Functional Skills English | Reading, Writing, Comprhension, Problems Solving, Nouns |
Functional Skills Maths | Compression,Reduction |
British Values | None covered in this session. |
Equality and Diversity |
Links to Learning Outcomes |
Links to Assessment criteria |
|
---|---|---|