Changing Text colour in text field by dropdown menu - Visual Studio 2008
- by Wayne
Hey, i'm just doing some testing on Visual Studio 2008, what i'm trying to do is to change the text colour inside the multi-textfield which isn't working and I don't know why...
Public Class Form1
Dim ColourValue As Color
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
rbBlue.Checked = False
rbRed.Checked = False
rbGreen.Checked = False
End Sub
Private Sub rbRed_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbRed.CheckedChanged
txtSpace.BackColor = Color.Red
End Sub
Private Sub rbBlue_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbBlue.CheckedChanged
txtSpace.BackColor = Color.Blue
End Sub
Private Sub rbGreen_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbGreen.CheckedChanged
txtSpace.BackColor = Color.Green
End Sub
Private Sub cbColours_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbColours.SelectedValueChanged
ColourValue = cbColours.SelectedValue
txtSpace.BackColor = ColourValue
End Sub
End Class
Basically i have the radio buttons that would change the background colour of the textfield, but i just need the dropdown menu to change the text colour.
Many thanks :)