Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

SftTabsTab.Align Property

Defines the tab text and graphic alignment.

Syntax

Get
VBAlign = object.Align As SftTabsAlignConstants
Put
VBobject.Align = Align As SftTabsAlignConstants

object

A SftTabsTab object.

Align

Defines the alignment of the tab text and graphic for the tab described by object.

AlignValueDescription
alignSftTabsDefault0The tab text and tab graphic are centered vertically and horizontally. The tab graphic is displayed to the left of the tab text.
alignSftTabsLeft1The tab text and tab graphic are centered vertically and left-aligned horizontally. The tab graphic is displayed to the left of the tab text.
alignSftTabsRight2The tab text and tab graphic are centered vertically and right-aligned horizontally. The tab graphic is displayed to the right of the tab text.
alignSftTabsTopGraph3The tab text and the required tab graphic are centered vertically and horizontally. The tab graphic is displayed above the tab text.
alignSftTabsBottomGraph4The tab text and the required tab graphic are centered vertically and horizontally. The tab graphic is displayed below the tab text.
alignSftTabsRightGraph5The tab text and the required tab graphic are centered vertically and horizontally. The tab graphic is displayed to the right of the tab text.

Comments

The Align property defines the tab text and graphic alignment.

The terms "vertical" and "horizontal" alignment are relative to the orientation (or base line) of the font used for the tab control, not the orientation of the form containing the tab control.

The Align property must be defined after the Tab.Image property has been defined. The Align values alignSftTabsTopGraph, alignSftTabsBottomGraph, alignSftTabsRightGraph can only be used if a valid picture has been defined. Otherwise the property is reset to alignSftTabsDefault.

The alignment of tabs (entire tab rows) within the tab control is defined using the Tabs.Alignment property.

Example

Private Sub Form_Load()
    Dim TabIndex As Integer
    Dim PicObject As StdPicture
    Set PicObject = LoadPicture("...path-to-bitmap...")
    With SftTabs1
        .Tabs.Clear
        TabIndex = .Tabs.Add("First Tab")
        TabIndex = .Tabs.Add("Second Tab")
        Set .Tab(TabIndex).Picture = PicObject
        .Tab(TabIndex).Align = alignSftTabsRightGraph
    End With
End Sub

See Also SftTabsTab Object | Object Hierarchy


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