Contents tagged with Windows Forms
-
Tab control with no visible tabs
One of my co-workers wanted to use a Windows Forms (2.0, in this case) TabControl as a way of swapping between sets of controls, but without display the actual tabs (controlling the switching entirely through code - a sort of swappable panel stack). After some fiddling around with various control settings, I found that the following seems to work:
- Set SizeMode to Fixed.
- Set ItemSize to 0,1. The control won't let you set a size of 0,0, but 0,1 seems to have the desired effect.
- Set Appearance to Buttons. This removes the tab control border.
Update - One limitation with this approach is that you can't easily change the background color of a tab control. So if you want, for example, a white background on your form, you're out of luck.