I’m making a windows form application that has a timeline not to different from one found in video editing software.
The controls on this time line are a custom class that inherits Button.
I want the user to be able to click the button once to select it (highlighted) and once again to unselect it. This is so the user can select several timeline items at once.
Is there any way to do this in C#?
Well actually you would be better off with CheckBox control and you can make it look just like regular button:
Note that you can assign each button with a different ‘Group’ property so that each one of them can be separately check or unchecked.