Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I program a multi-menu application?

Status
Not open for further replies.

furjaw

Programmer
Mar 27, 2006
49
US
Here is an example of the type of thing that I need to do using Visual Basic Express:

Let's say that you are ordering a vehicle. First you pick the vehicle type:

Sedan

Sport Utility

Mini Van

Pickup Truck

Then, depending on which you selected, you get a list of exterior colors. Different colors are offered for each different vehicle type.

Then you are offered;

Leather seats

Cloth seats

Then you select an engine size. Different engines are offered for each different vehicle type.

Then you select a transmission, etc.

I prefer to use RadioBoxes with one of the RadioBoxes preselected as a default. Then I would like to have a Button1 labeled "Next" and a Button2 labeled "Back".

Where can I get a sample program that does this type of thing?

I tried to program it, but, the Button1_Click event or RadioButton1_checked_changed subroutines didn't work out because they caused me to get "lost". I need control to return to my next line of code after the user makes his selection.

 
I would prefer to use Comboboxes for these type of selection operations. Mainly because when you need to add selectable items to your form, you don't have to change you layout completely.

It's also easier to 'go to the next step' by reading the ComboBox's SelectedIndexChanged event.

In plain English code you would have to follow some steps:

If the Vehicle Type combobox changes Then
Read the contents of the combobox
Store the choice in a variable
Fill the Exterior Colors combobox with valid values
Show the Exterior Colors combobox

If the Exterior Colors combobox changes Then
Read the contents of the combobox
Store the choice in a variable
Fill the Seats Materials combobox accordingly
.... and so on

Regards, Ruffnekk
---
Do not underestimate the power of simplicity!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top