Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

SftTabsTabs.LayoutMode Property

Defines the layout mode of all tabs within the control.

Syntax

Get
VBStyle = object.LayoutMode As SftTabsTabsLayoutModeConstants
Put
VBobject.LayoutMode = Style As SftTabsTabsLayoutModeConstants

object

A SftTabsTabs object.

Styletable

NameValueDescription
layoutModeDistribute0Distribute - Distribute tabs equally among rows. All tabs are distributed among all rows, so each has about the same number of tabs.
layoutModeFlow1Flow - Add as many tabs to front rows as possible. As tabs are added, they are added to the first row, until the space is exhausted, at which point the next row receives additional tabs. This mode uses the number of rows defined using the SftTabsTabs.Rows property. When the control is resized, the tabs are redistributed among the available rows. Dual-sided tab controls always distribute tabs equally among rows.
layoutModeAutoFlow2AutoFlow - Add as many tabs to front rows as possible and update then number of rows when control is resized. As tabs are added, they are added to the first row, until the space is exhausted, at which point the next row receives additional tabs. This mode dynamically recalculates the number of rows required to fit all tabs, without clipping or dropping tab labels. The range of available rows can be limited using the SftTabsTabs.MinRows and SftTabsTabs.MaxRows properties. When the control is resized, the number of rows required is recalculated and the tabs are redistributed among the available rows. Dual-sided tab controls always distribute tabs equally among rows.

Comments

The LayoutMode property defines the layout mode of all tabs within the control.

As tabs are distributed, the first row is the row containing the tab with tab index 0.

When using scrollable tabs, the LayoutMode property has no effect as scrollable tabs are limited to just one row.

Example

Private Sub Form_Load()
    Dim Index As Integer
    With SftTabs1.Direct
        .Tabs.Clear
        Index = .Tabs.Add("First")
        .Tabs.Current = Index
        Index = .Tabs.Add("Second")
        Index = .Tabs.Add("Third")
        Index = .Tabs.Add("Fourth")
        Index = .Tabs.Add("Fifth")
        .Tabs.MinRows = 2
        .Tabs.MaxRows = 3
        .Tabs.LayoutMode = layoutModeAutoFlow
    End With
End Sub

See Also SftTabsTabs Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.