Menus and buttons

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
2 posts Page 1 of 1
Contributors
User avatar
iPol
Just Registered
Just Registered
Posts: 6
Joined: Wed Jan 05, 2011 6:09 pm

Menus and buttons
iPol
I have a Menu Strip designed like so

Select Pizza
.......
cheese and tomato
ham and pineapple
vegetarian
meat feast
seafood
..........................
thin and crispy base
traditional base

I also have checkboxes for the drinks like so

*Cola
*Lemonade
*Fizzy Orange

So I want the user to be able to select which pizza with any topping and any base also with a drink using the checkboxes and by pressing the enter button on the form have this displayed on a listbox (if that's whats best), How do I do this?
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Menus and buttons
comathi
Maybe try this:

Right below the class name, put this:
Code: Select all
Dim Toppings as string
Dim Base as String
Dim Drink as String
Aso, you should replace the CheckBoxes by RadioButtons so that the person can only choose one drink.

Now, put this code for each Topping MenuItem's "Click" event:
Code: Select all
Toppings="name of topping"
And for each of the Base MenuItem's "Click" event, put this:
Code: Select all
Base="name of base"
Now, in the Button's "Click" event, put this:
Code: Select all
if radiobutton1.checked=true then
drink="Cola"
elseif radiobutton2.checked=true then
drink="Lemonade"
elseif radiobutton3.checked=true then
drink="Fizzy Orange"
End If

Listbox1.items.add("Toppings: " & Toppings)
Listbox1.items.add("Base: " & Base)
Listbox1.items.add("Drink: " & Drink)
Hope this helps :D

-Comathi-
2 posts Page 1 of 1
Return to “Tutorial Requests”