[RESOLVED] Back Color on Focus
Hi
When DataGridView1 has focus, ie, the user is entering data, i'd like tool strip 6 to be color.Firebrick
and when somewhere else on the form is clicked, toolstrip 6 should be color.gray
Code:
Private Sub DataGridView1_GotFocus(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.GotFocus
ToolStrip6.BackColor = Color.Firebrick
End Sub
this code doesnt seem to work...any help is welcome :)
Re: [RESOLVED] Back Color on Focus
You're welcome. Glad to have helped!
Just out of curiosity, what did you change?
Re: [RESOLVED] Back Color on Focus
the only thing i changed was the tool strip name, changed it to "TS" as in the code, and that seemed to click it over...i should really have changed it earlier :S
Re: [RESOLVED] Back Color on Focus
interestingly, i've now got the same problem with a web browser control...i've changed the name and it won't work...wonder what the problem is with that...
Re: [RESOLVED] Back Color on Focus
Try creating a different event after you changed the name. Some of the experts will explain this better than I will, but, when you change the name of a control after you already have events associated with it, something gets messed up with the syntax in your existing event.
That doesn't sound very clear...