Results 1 to 2 of 2

Thread: [RESOLVED] Can't get multiple radio buttons to draw

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    135

    Resolved [RESOLVED] Can't get multiple radio buttons to draw

    Hi all,

    I'm trying to draw multiple radio buttons on my form. I've used this same logic to draw multiple text boxes and for some reason, this doesn't work.

    Code:
    For counter As Integer = 0 To rc - 1
    
                    'controller name Radio button and properties.
                    Dim dynRadio As New RadioButton()
                    Me.Controls.Add(dynRadio)
                    With dynRadio
                        .Name = "dynamic_radio" & counter
                        .Location = New Point(xAxis, yAxis)
                        .TabStop = False
                        .Text = CStr(ds.Tables("MakeThisNameMeaningful").Rows(counter).Item(0))
                    End With
    
                    xAxis = xAxis + 20
    
                Next
    I have validated that:
    rc = 3 and the loop does iterate three times.
    The values that come back from the db are correct.
    xAxis and yAxis are placed properly and is the same increment as my text boxes.

    It's just not giving me three radio buttons for some reason. It only displays the first one.

    Any ideas?

    Cheers,
    J

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    135

    Re: Can't get multiple radio buttons to draw

    Oops. Stupid me. Was incrementing the x axis whey I should have been using the y axis.

    Funny how you leave something for 20 minutes then come back to it....

    Doh.

Posting Permissions

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



Click Here to Expand Forum to Full Width