Page 307 -
P. 307

radio buttons


           Radio buttons force users to choose a

           valid depot
                                                                             Click AM and the FM button pops up.

           Text fields aren’t the only data-entry game in town. If you look at any
           GUI program, you will find a whole host of different widgets being used:
           sliders, buttons, check boxes. Why are there so many different types of
           widget? Are they just there to make the interface more interesting to use?
           The reason there are so many widgets is to allow the programmer to
           efficiently manage and control the kind of data that people can enter.
           If you want to allow a small number of values for a field, you can   Click FM and the AM button pops up.
           use the radio button widget. A radio button works just like the AM/FM
           selection buttons on your radio: press AM and the FM button pops up.
           Press FM and the reverse happens.
           Radio buttons in a GUI program work in the same way: if you select
           one of the buttons, the other buttons are automatically deselected. That
           way, you can choose only one from a small group of options.




                                        Depot:
                    Radio buttons    Cambridge, MA


                                      Cambridge, UK
                                       Seattle, WA


                                     Description:


                                       Address:








                                          Save
                                                                Sounds OK.
                                                                Can I see a
                                                                prototype?
           So if you replace the depot Entry field in the Head-Ex
           program with a set of radio buttons, you prevent users from
           entering ambiguous depot names. That way, they will be able
           to choose one, and only one, depot.


           272    Chapter 8
   302   303   304   305   306   307   308   309   310   311   312