1

I know that the ToolStripButton has checkbox functionality and should be used when you need a checkbox on a ToolStrip. However, the blue outline that appears to be the only indication of being Checked doesn't exactly scream "Hey, this is a checkbox!" to users. I could have sworn that I had previously found a way to get a ToolStripButton to show a checkbox in lieu of an image before, but apparently I deleted that instance after I decided on a different UI scheme for what I needed it for then; and I can't for the life of me seem to figure out how I got it working before.

Maybe all I did was add an image of a check; however, I would expect that my Resources would still have an image that I used for an unchecked state if that were the case. Is there any way to get a ToolStripButton to show an actual checkbox without resorting to making it myself?

Trevortni
  • 688
  • 8
  • 23

1 Answers1

0

Create your own component inheriting ToolStripControlHost that hosts a CheckBox control. That's exactly what the ToolStripComboBox, ToolStripProgressBar and ToolStripTextBox components do for ComboBox, ProgressBar and TextBox controls.

jmcilhinney
  • 50,448
  • 5
  • 26
  • 46
  • I see that somebody has downvoted your answer, and I am curious if they or anybody else might be willing or able to supply a reason. – Trevortni Apr 12 '18 at 16:17
  • I was wondering the same thing myself. Maybe because it doesn't answer directly the question of how to get a `ToolStripButton` to display a check box but it wouldn't be an actual `CheckBox` control in that case anyway. – jmcilhinney Apr 12 '18 at 23:00