Guides & Tutorials (beta)

Adding Multi-Row Tabs

by Mike Palmatier Visual Basic 6 Created on 05/03/2008  |  Updated on 07/31/2024 0/5 ( 0 votes )

The TabControl can display more than one row of tabs by changing the Layout property to xtpTabLayoutMultiRow. The number of rows is automatically set by the width and number of the tabs. The number of rows can change if the control is resized, which ensures that the tabs wrap to the next row. If the tab layout is not set to xtpTabLayoutMultiRow, and the last tab exceeds the width of the control, left and right arrow buttons are added at the right end of the TabControl.

    'The TabControl can display more than one row of tabs
    'by changing the Layout to xtpTabLayoutMultiRow.
    TabControl.PaintManager.Layout = xtpTabLayoutMultiRow

Multi Row Tabs

The MultiRowJustified property specifies the justification of the tabs in the TabControl. When True, each tab is wide enough to accommodate its caption and, if needed, the width of each tab is increased so that each row of tabs spans the width of the TabControl. This will stretch each row of tabs to fill the entire width of the TabControl.

If False, the tab rows will be non-justified. Each tab is just wide enough to accommodate its caption. The rows are not justified, so multiple rows of tabs are "jagged".

    'The MultiRowJustified property specifies the
    'justification of the tabs in the TabControl.
    TabControl.PaintManager.MultiRowJustified = True

Multi Row Justified Tabs

The MultiRowFixedSelection property specifies whether the the row of the currently selected tab will be moved to the front of the tab rows. This determines how remaining rows of tabs in front of a selected tab are repositioned.

When False, the rows of tabs in front of the selected tab are repositioned at the opposite side (behind) of the control. For example, if there are three rows in the multi-row tab-control, and a tab in the second row is selected, all tab rows will be repositioned behind the second row.

When True, the rows in a multi-row tab control remain "fixed" when a tab is selected. The remaining rows of tabs in front of a selected tab will not be repositioned. For example, if there are three rows in the multi-row tab-control, and a tab in the second row is selected, the tab rows will remain the same.

    'specifies whether the the row of the currently selected
    'tab will be moved to the front of the tab rows.  This
    'determines how remaining rows of tabs in front of a
    'selected tab are repositioned.
    TabControl.PaintManager.MultiRowFixedSelection = False

User Comments

No comments yet, sign in to comment.

New Year Sale 2025

Secure Transactions

Online transactions are secure and protected.


Ssl seal 1
This site is protected by Trustwave's Trusted Commerce program
CompliAssure Secured

Money Back Guarantee

If you are not 100% happy with your purchase within 30 days, you can return it for any reason. Your satisfaction is our priority!


Satisfication Guarantee

Contact sales@codejock.com for more details.