Closed Thread
Results 1 to 5 of 5

Thread: Help with updating Form in real time with radio buttons

  1. #1
    juniordee's Avatar
    juniordee is offline Newbie
    Join Date
    Oct 2009
    Posts
    9
    Rep Power
    0

    Help with updating Form in real time with radio buttons

    I am working on a project for my programming course. We have to make a form that will order pizzas. We have size, type, toppings, and cost. Cost is done by having labels that will change it's text values depending on the toppings (check boxes), size and type (radio buttons).

    Now my question is, when I use the example .exe that we have to replicate, I change the toppings, size, etc and the cost changes with the selections in real time. But with the program I wrote, I have to wait till I press a button before it changes. How do I make it update in real time?

    I'm sure it's something really simple.

    Thanks.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Apr 2009
    Location
    Uppsala, Sweden
    Posts
    9,547
    Blog Entries
    5
    Rep Power
    98

    Re: Help with updating Form in real time with radio buttons

    Instead of having an event handling the button's click you should add it to your radio buttons and check boxes' checkedchanged event, like so:

    Code:
        Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged, RadioButton2.CheckedChanged, CheckBox1.CheckedChanged, CheckBox2.CheckedChanged 'etc.
            'your code goes here instead
        End Sub

  4. #3
    juniordee's Avatar
    juniordee is offline Newbie
    Join Date
    Oct 2009
    Posts
    9
    Rep Power
    0

    Re: Help with updating Form in real time with radio buttons

    I did try that, but for some reason it didn't work

    EDIT: Ok I tried again, and it only updates the size, and not the price (but it's all in the same piece of code?).

    I made a refresh button and included the same sub in it, and it updates everything when I use the button. But I want it to update when I select the radio buttons and check the checkboxes...

  5. #4
    Join Date
    Apr 2009
    Location
    Uppsala, Sweden
    Posts
    9,547
    Blog Entries
    5
    Rep Power
    98

    Re: Help with updating Form in real time with radio buttons

    I can't help you more without any code since that will update it with the correct code

  6. #5
    juniordee's Avatar
    juniordee is offline Newbie
    Join Date
    Oct 2009
    Posts
    9
    Rep Power
    0

    Re: Help with updating Form in real time with radio buttons

    Well, turns you were right. I probably did something wrong earlier but I tried again (for a 3rd time) and it does exactly what I want it to do. Thanks!

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Radio Buttons dont we just love them :)
    By PSmith in forum C# Programming
    Replies: 1
    Last Post: 09-12-2011, 05:33 AM
  2. Passing multiple radio values in a form..
    By DavidJ in forum PHP Development
    Replies: 1
    Last Post: 05-13-2011, 12:50 PM
  3. Replies: 2
    Last Post: 12-09-2010, 10:59 PM
  4. Can I have two buttons in a form?
    By ezcat in forum PHP Development
    Replies: 2
    Last Post: 12-29-2009, 11:09 AM
  5. Real Time?
    By DiscoBob in forum PHP Development
    Replies: 6
    Last Post: 07-13-2006, 10:51 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts