Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

SftPictureObject.SampleColor Property

Defines the picture object as a color sample.

Syntax

Get
VBClr = object.SampleColor As OLE_COLOR
Put
VBobject.SampleColor = Clr As OLE_COLOR

object

A SftPictureObject object.

Clr

Defines the picture object as a color sample.

Comments

The SampleColor property 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 SftPictureObject.FrameColor property can be used to define the border color of the color sample.

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.