By default, NET positions TabControl tabs at the top of the control and labels them with plain text. Unfortunately, you can't easily change the back color of the tab or the font of its text. However, that doesn't mean you have to settle for bland, boring tabs. Three simple adjustments you can make to TabControl tabs without writing a single line of code include: adding images to each tab, changing the position of the tabs, and stacking multiple tabs for easier viewing.
To add images to tabs:
To add images to tabs:
- Add an ImageList to your project and select it.
- In the Properties window, use the Images property to add images to the ImageList collection.
- Add a TabControl to your form and select it.
- In the Properties window, use the dropdown list in the ImageList property to select the name of the ImageList you just created.
- Locate the TabPages property and click the ellipses in the field.
- Click the Add button to add a new TabPage and then use the dropdown list in the ImageIndex property to select the desired tab image.
- Repeat step 6 as needed.
- In the Properties window, locate the Alignment property for the TabControl.
- Change the value to Right, Bottom, or Left to reposition the group of tabs.
- In the Properties window, locate the Multiline property for the TabControl and change the value to True.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.