I am tired of trying to deactivate the button highlight when it's activated with "istab" set to true.
Basically, I want to deactivate the back highlight of a button (if it's activated) when I click on the picture box. The method partially works. The istab deactivation works when I click on the picture box and the highlight goes away. But I made a method so that when the mouse hovers over the button, "istab" automatically reactivates. But it doesn't seem to work. The "istab" remains deactivated.
Here is what I have tried so far.
private void LogoImage_Click(object sender, EventArgs e)
{
if (btnEssentialRules.IsTab == true)
btnEssentialRules.IsTab = false;
}
private void btnEssentialRules_MouseHover(object sender, EventArgs e)
{
if (btnEssentialRules.IsTab == false)
btnEssentialRules.IsTab = true;
}
Where the btnEssentialRules is the button name.
If you have another solution or a fix to my code. please help me.