option group versus combo box

  • Thread starter Thread starter Deb
  • Start date Start date
D

Deb

What is the advantages of using a option group over a
combo box? My example is this: I have clients with
vision loss. I want to record their main cause of vision
loss. Should I use a combo box that has the different
causes they can choose from, or should I use an option
group for them to select the cause. What are the
advantages and disadvantages?

--Deb
 
Deb said:
What is the advantages of using a option group over a
combo box? My example is this: I have clients with
vision loss. I want to record their main cause of vision
loss. Should I use a combo box that has the different
causes they can choose from, or should I use an option
group for them to select the cause. What are the
advantages and disadvantages?

--Deb

If the combobox is dynamic 0 ie reads the data from a table that is the way
to go. If you are putting literals into the combobox or option groups, then
each time you come across a new condition you will need to change the
application to cater for it. Rather just have a table, and source the
combobox from there.

For instance: in really simple cases, such as gender, hard coding or using
literals is acceptable in most cases, because it would be very rare to cater
for more than M and F. In almost all other cases the dynamic solution is
preferable - the whole point of a database system is that you don't have to
make changes all the time.

My 2c
Marc
 
Deb said:
What is the advantages of using a option group over a
combo box? My example is this: I have clients with
vision loss. I want to record their main cause of vision
loss. Should I use a combo box that has the different
causes they can choose from, or should I use an option
group for them to select the cause. What are the
advantages and disadvantages?

It depends (doesn't it always?).

If your form has the real estate an Option Group might be appealing
visually because you not only see the choice that was made, but you see the
alternatives at a glance as well whereas with a ComboBox you have to drop
the list to see them. his advantage goes away though if you use a ListBox
instead of a ComboBox.

For flexibility a ComboBox or ListBox wins out easily. Their choices can
be driven from a table so if you need to change or add choices, you just
edit the table and no design changes are required on your form. If you
need to do the same with an OptionGroup you have to revise the design of
the form every time.

ComboBoxes and ListBoxes also give you the choice of storing a numeric key
value linked to the text for the option or storing the actual text. An
OptionGroup must store a numeric value unless you fudge its normal usage
with some code.
 
Back
Top