Public Class QuestionDisplay
Inherits Windows.Forms.GroupBox
'Form Controls
Dim m_Question As New Windows.Forms.TextBox
Dim m_Comment As New Windows.Forms.TextBox
Dim m_GroupBox As New Windows.Forms.GroupBox
Dim m_rbtn1 As New Windows.Forms.RadioButton
Dim m_rbtn2 As New Windows.Forms.RadioButton
Dim m_rbtn3 As New Windows.Forms.RadioButton
Dim m_rbtn4 As New Windows.Forms.RadioButton
Dim m_rbtn5 As New Windows.Forms.RadioButton
'Positions
Dim m_xPos As Integer
Dim m_yPos As Integer
Public Sub New(ByVal xpos As Integer, ByVal ypos As Integer)
m_xPos = xpos
m_yPos = ypos
Me.Width = 470
Me.Height = 37
Me.Location = New Point(5, 26)
SetPositions()
End Sub
Private Sub SetPositions()
'ADD Question to GBO
m_Question.Location = New Point(1, 10)
m_Question.Width = 180
m_Question.Height = 20
m_Question.Name = "m_Question"
Me.Controls.Add(m_Question)
m_GroupBox.Location = New Point(190, 4)
m_GroupBox.Width = 100
m_GroupBox.Height = 30
m_GroupBox.Name = "m_GroupBox"
PositionRbtns()
AddRbtnsToGroupBox()
Me.Controls.Add(m_GroupBox)
'Add Comment to GBO
m_Comment.Location = New Point(300, 10)
m_Comment.Width = 170
m_Comment.Height = 20
m_Comment.Name = "m_Comment"
Me.Controls.Add(m_Comment)
End Sub
Private Sub PositionRbtns()
m_rbtn1.Location = New Point(5, 10)
m_rbtn1.Name = "m_rbtn1"
m_rbtn2.Location = New Point(25, 10)
m_rbtn2.Name = "m_rbtn2"
m_rbtn3.Location = New Point(45, 10)
m_rbtn3.Name = "m_rbtn3"
m_rbtn4.Location = New Point(65, 10)
m_rbtn4.Name = "m_rbtn4"
m_rbtn5.Location = New Point(85, 10)
m_rbtn5.Name = "m_rbtn5"
End Sub
Private Sub AddRbtnsToGroupBox()
m_GroupBox.Controls.Add(m_rbtn1)
m_GroupBox.Controls.Add(m_rbtn2)
m_GroupBox.Controls.Add(m_rbtn3)
m_GroupBox.Controls.Add(m_rbtn4)
m_GroupBox.Controls.Add(m_rbtn5)
End Sub
End Class