Oppure

Loading
05/08/14 19:06
Shark
come posso aggiungere dei radiobutton inizialmente in "Array1" ad "Array2"?

For Each radiobutton in array1
If RadioButton.Checked Then
RadioButton.Location = New Point (l ,i)
[E QUI IL CODICE PER AGGIUNGERE IL RADIOBUTTON ALL'ARRAY2]
End If
next
aaa
05/08/14 21:04
dnha
Ciao, non ho capito in che senso i radiobutton sono in un array :-?
Puoi postare il codice completo?
aaa
05/08/14 21:32
Shark
Sub Button3Click(sender As Object, e As EventArgs)
array1 = New RadioButton (6) {radioButton1, radioButton2, radioButton3, radioButton4, . radioButton5, radioButton6, radioButton7}
        
For Each radiobutton In array1
            i= 0
            
            If radioButton1.Checked
                i = 300
                l = 250
            ElseIf radioButton2.Checked
                i = 285
                l = 255
            ElseIf radioButton3.Checked
                i = 270
                l = 260
            ElseIf radioButton4.Checked
                i = 255
                l = 265
            ElseIf radioButton5.Checked
                i = 240
                l = 270
            ElseIf radioButton6.Checked
                i = 225
                l = 275
            ElseIf radioButton7.Checked
                i = 210
                l = 280
        End If
    
            
                If RadioButton.Checked Then
                    RadioButton.Location = New Point (l ,i)
[E QUI IL CODICE PER AGGIUNGERE IL RADIOBUTTON ALL'ARRAY2]
                End If
            Next
    End Sub


questa è la sub del bottone, praticamente ho bisogno che mi aggiunga i radiobutton che vengono spostati in un altro array,il due appunto.....
aaa
06/08/14 12:27
dnha
Prova con (VB.NET) :k: :
Dim array2
If RadioButton.Checked Then
   RadioButton.Location = New Point (l ,i)

   ReDim Preserve array2(array2.lenght)
   array2(array2.lenght) = radiobutton
End If 

aaa