0

How to forcefully show tooltip on "Enable=false" control.

I have a checkbox which is enabled false but i want to still show tooltip on it. is there any way to achieve this?

Thanks in advance

Agent_Spock
  • 1,107
  • 2
  • 16
  • 44

1 Answers1

1

Not from the CheckBox control itself, it will no longer receive any mouse messages. Its Parent will now get them. Which gives you a hack around this restriction:

    private void Form1_MouseMove(object sender, MouseEventArgs e) {
        if (checkBox1.Bounds.Contains(e.Location)) {
            toolTip1.Show("yadayada", this);
        }
    }

Strictly for entertainment, I have to recommend that you don't do this.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536