I am wanting to utilize a TrackBar in my Visual Studio project. My goal is to have the user scroll the TrackBar's indicator, and based on which value range it is in, it will change the a label's text.
Here's an example of how I tried to accomplish this:
Private Sub ScrollBarProgress() Handles MyBase.Load
If SelfEvaluationReportBAR.Value = (0) Then
FeelingLBL.Text = "Please select a value."
End If
If SelfEvaluationReportBAR.Value = (1, 25) Then
FeelingLBL.Text = "I am starting to develop my ability to perform this task."
End If
If SelfEvaluationReportBAR.Value = (26, 50) Then
FeelingLBL.Text = "I feel improvement in my ability to perform this task."
End If
If SelfEvaluationReportBAR.Value = (51, 75) Then
FeelingLBL.Text = "My confidence in my ability to perform this task is substantial."
End If
If SelfEvaluationReportBAR.Value = (76, 100) Then
FeelingLBL.Text = "I feel fully confident in my ability to efficiently and accurately perform the day to day tasks that are assigned to me."
End If
End Sub
The problem is that whenever I tried to set the range, it gives the following error:
Error BC30452 Operator '=' is not defined for types 'Integer' and '(Integer, Integer)'.
I think I have the formatting wrong. Does anyone have any ideas on how the range could/ should be formatted?
Here are my current settings for the TrackBar:
Private Sub SelfEvaluationReportBAR_Scroll(sender As Object, e As EventArgs) Handles MyBase.Load
SelfEvaluationReportBAR.Minimum = 0
SelfEvaluationReportBAR.Maximum = 100
SelfEvaluationReportBAR.SmallChange = 1
SelfEvaluationReportBAR.LargeChange = 5
SelfEvaluationReportBAR.TickFrequency = 5
End Sub
End Class
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…