Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

SftPictureObject.SetColorSample Method

Defines the picture object as a color sample.

Syntax

VBobject.SetColorSample(ByVal SampleColor As OLE_COLOR, ByVal FrameColor As OLE_COLOR)

object

A SftPictureObject object.

SampleColor

Defines the color sample.

FrameColor

Defines the border color.

Comments

The SetColorSample method defines the picture object as a color sample.

The SftPictureObject.Type property is set to sftTypeColorSample.

The SftPictureObject.Height and SftPictureObject.Width properties should be used to define the requested image size.

The color sample can also be defined using the SftPictureObject.SampleColor and SftPictureObject.FrameColor properties.

Example

This example adds a color sample to the first tab. Clicking on a button changes the colors.

Private Sub Command1_Click()
    With SftTabs1.Direct
        .Tab(0).Image.FrameColor = vbGreen
        .Tab(0).Image.SampleColor = vbRed
    End With
End Sub

Private Sub Form_Load()
    With SftTabs1.Direct
        .Style = styleSftTabsModernTop
        .Tab(0).Image.SetColorSample vbBlue, vbRed
    End With
End Sub

See Also SftPictureObject Object | Object Hierarchy


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