Advertisement

04.02.2008 at 08:41PM PDT, ID: 23291685
[x]
Attachment Details

Clearing controls

Asked by sirbounty in .Net Editors & IDEs, Microsoft Visual Basic.Net, .NET Framework 2.0

I'm creating a testing app, in which I feed in questions and answers and then display them on the form.
The problem I'm running into is that when the user selects an answer (radiobutton), my cleanup of those buttons isn't working correctly.

I tried a for/each through all container controls (they'll all be radbuttons), but it would stop after 2 (when 2 still remained) and load the next question...arg... : (
So, next I tried a counter, but the same problem seems to be occurring - I'm missing something stupid, I just know it (cause it's late and that's when I make most of my mistakes! :)

What could it be?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
For x As Int16 = 0 To grpAnswers.Controls.Count - 1
            rb = DirectCast(grpAnswers.Controls.Item(x), RadioButton)
            rb.Text = ""
            rb.Checked = False
            rb.Visible = False
            grpAnswers.Controls.Remove(rb)
            rb.Dispose()
            rb = Nothing
        Next
[+][-]04.02.2008 at 08:58PM PDT, ID: 21269626

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 09:00PM PDT, ID: 21269634

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 09:11PM PDT, ID: 21269678

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 10:06PM PDT, ID: 21269813

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 11:17PM PDT, ID: 21270045

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.03.2008 at 12:27AM PDT, ID: 21270290

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.03.2008 at 12:27AM PDT, ID: 21270293

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.03.2008 at 07:44AM PDT, ID: 21273207

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.03.2008 at 07:46AM PDT, ID: 21273223

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .Net Editors & IDEs, Microsoft Visual Basic.Net, .NET Framework 2.0
Sign Up Now!
Solution Provided By: Idle_Mind
Participating Experts: 5
Solution Grade: A
 
 
[+][-]04.03.2008 at 01:59PM PDT, ID: 21276904

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906