Results 1 to 3 of 3

Thread: Radio Group Control

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Location
    Alpharetta GA ( Metro Atlanta GA )
    Posts
    3

    Radio Group Control

    I am developing a vb .net windows application. Very standard stuff.

    It seems to me that processing Radio buttons in a group is way too difficult.

    Does some one know of a .net control that will do all this for you. I really do not want to stop and write one myself.

    There is a vb6 control called RadioGroup that seems like what I am hunting for but I do not know it there are any problems using that in .net

    tia
    de Colores...bartee...

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Well , you still have another option if you don't like GroupBox , use Panels .

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Location
    Alpharetta GA ( Metro Atlanta GA )
    Posts
    3

    Thumbs up Problem solved with two routines

    solved my problem. These were not difficult to write and seem to work. NOT fancy or all inclusive, but they work for me.

    ---------------------------------------
    Private Function getRadio(ByRef pGroup As System.Windows.Forms.GroupBox) As String
    Dim oRadio As System.Windows.Forms.RadioButton
    Dim sReturn As String = ""
    Try
    For Each oRadio In pGroup.Controls
    If oRadio.Checked Then
    sReturn = oRadio.Text
    End If
    Next
    Return sReturn
    Catch
    Return Err.Description
    End Try

    End Function
    Private Sub setRadio(ByRef pGroup As System.Windows.Forms.GroupBox, ByVal pValue As String)
    Dim oRadio As System.Windows.Forms.RadioButton
    For Each oRadio In pGroup.Controls
    If Trim(oRadio.Text) = Trim(pValue) Then
    oRadio.Checked = True
    Exit Sub
    End If
    Next
    End Sub
    de Colores...bartee...

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