|
-
Apr 28th, 2003, 07:16 AM
#1
Thread Starter
New Member
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
-
Apr 28th, 2003, 08:08 AM
#2
Sleep mode
Well , you still have another option if you don't like GroupBox , use Panels .
-
Apr 28th, 2003, 11:55 AM
#3
Thread Starter
New Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|