Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

SftTabs.GetControlSize Method

Returns the dimensions of the control given the dimensions of the required client area.

Syntax

VBobject.GetControlSize(Left As Single, Top As Single, Width As Single, Height As Single)

object

A SftTabs object.

Left

The required left edge of the client area. On return it contains the required location of the left edge of the tab control described by object. The units used depend on the current coordinate system used (usually TWIPS).

Top

The required top edge of the client area. On return it contains the required location of the top edge of the tab control described by object. The units used depend on the current coordinate system used (usually TWIPS).

Width

The required width of the client area. On return it contains the required width of the tab control described by object. The units used depend on the current coordinate system used (usually TWIPS).

Height

The required height of the client area. On return it contains the required height of the tab control described by object. The units used depend on the current coordinate system used (usually TWIPS).

Comments

The GetControlSize method returns the dimensions of the control given the dimensions of the required client area.

The GetControlSize and GetControlSizePix properties are synonyms, but use different coordinate systems.

This method can be used to calculate the tab control size if a minimum or specific client area size is required. By calling GetControlSize with the dimensions of the required client area (Left, Top, Width, Height), SftTabs/OCX calculates the overall tab control size based on the current tab control property settings and returns the dimensions in the parameters Left, Top, Width, Height.

Example

Private Sub Form_Load()
    Dim Left As Single, Top As Single, Width As Single, Height As Single
    Left = 0
    Top = 0
    Width = 2000
    Height = 1000
    ' we want a client area of 2000 x 1000 twips
    ' calculate the control's required size
    SftTabs1.GetControlSize Left, Top, Width, Height
    ' resize the control
    SftTabs1.Width = Width
    SftTabs1.Height = Height
End Sub

See Also SftTabs Object | Object Hierarchy


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