我试图在文本框中只加粗某些行,而不是所有输出。而且我还试图在文本框的最右边填充几行,而不是所有的行,以使其看起来更干净。
我正在尝试将所有(txtBoxCourse
文本框)加粗并尝试将所有(文本框)缩进txtBoxGrades
右侧。
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim semester, Newline As String
Dim totalGPA As Double = QualityPoints / txtBoxTotalHours.Text
Newline = System.Environment.NewLine
semester = CStr(txtBoxResults.Text)
txtBoxTotalGPA.Text = CStr(totalGPA)
txtBoxTotalGPA.Text = Math.Round(totalGPA, 3)
If radButtonFall.Checked Then
semester = "Fall"
ElseIf radButtonSpring.Checked Then
semester = "Spring"
ElseIf radButtonSummer.Checked Then
semester = "Summer"
End If
txtBoxResults.Text = (semester & " " & "Semester : ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & "Total Hours : " & txtBoxTotalHours.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & "Total Qualit Points : " & txtBoxTotalQualityPoints.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & "Total " & semester & " " & "GPA : " & txtBoxTotalGPA.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & "Enrolled Courses : ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & txtBoxCourse1.Text & " " & txtBoxGrade1.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & txtBoxCourse2.Text & " " & txtBoxGrade2.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & txtBoxCourse3.Text & " " & txtBoxGrade3.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & txtBoxCourse4.Text & " " & txtBoxGrade4.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & txtBoxCourse5.Text & " " & txtBoxGrade5.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & txtBoxCourse6.Text & " " & txtBoxGrade6.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & txtBoxCourse7.Text & " " & txtBoxGrade7.Text)
txtBoxResults.Text = (txtBoxResults.Text & Newline & " ")
txtBoxResults.Text = (txtBoxResults.Text & Newline & txtBoxCourse8.Text & " " & txtBoxGrade8.Text)
End Sub