Hi there!!
This is what I can come up with so far. You can use a string variable instead of a textbox.
I cannot find anything where you only change the color of the selected text but I will see if I can find anything else.
private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
textBox1.Text = listBox1.Text;
int count = 0;
count = listBox1.SelectedIndex;
if(count == listBox1.SelectedIndex)
//if(listBox1.Text == textBox1.Text)
{
listBox1.BackColor = Color.Beige;
listBox1.ForeColor = Color.Blue;
textBox1.ForeColor = listBox1.ForeColor;
}
}
Good Luck
Jan
dude_in_africa
|