Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

SftTabs.SetInsideOffset Method

Defines the alignment offset for the inside background bitmap.

Syntax

VBobject.SetInsideOffset(ByVal Horz As Single, ByVal Vert As Single)

object

A SftTabs object.

Horz

The horizontal origin with which the background bitmap (BackgroundInside) should be aligned. The units used depend on the current coordinate system used (usually TWIPS).

Vert

The vertical origin with which the background bitmap (BackgroundInside) should be aligned. The units used depend on the current coordinate system used (usually TWIPS).

Comments

The SetInsideOffset method defines the alignment offset for the inside background bitmap.

The SetInsideOffset and SetInsideOffsetPix methods are synonyms, but use different coordinate systems.

If the background bitmap defined using the BackgroundInside property is also used on the form (or control) containing the tab control, it is possible to achieve a smooth transition from the outside of the tab control (i.e. the form) to the inside of the tab control by specifying an origin where the bitmap is aligned.

In the above example, MainTab1 (the main tab control) uses a background bitmap (BackgroundInside) which is by default aligned with the top left corner of the control's window.

Nested1 uses the same bitmap. By default its BackgroundInside and BackgroundOutside bitmaps would be aligned with the top left corner of its window (Nested1). This would cause the backgrounds of MainTab1 and Nested1 to be misaligned as they are not aligned to the same position.

By aligning Nested1's bitmaps with the top left corner of MainTab1, the bitmaps are tiled starting at the same origin, resulting in a smooth transition from MainTab1 to Nested1:

Nested1.SetInsideOffset(Nested1.Left, Nested1.Top)
Nested1.SetOutsideOffset(Nested1.Left, Nested1.Top)

The above code should be used to specify that "Nested1" is offset by the specified distances (Nested1.Left, Top) from the origin of the background bitmap.

See Also SftTabs Object | Object Hierarchy


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