Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftPictureObject.Appearance Property

Defines the image object using a built-in, special purpose image.

Syntax

Get

VB.NETStyle = object.Appearance As SftPictureImageConstants
VBStyle = object.Appearance As SftPictureImageConstants
C#.NETSftPictureImageConstants Style = object.Appearance;
VC++enum SftPictureImageConstants Style = object->Appearance;enum SftPictureImageConstants Style = object->GetAppearance();
CHRESULT object->get_Appearance(enum SftPictureImageConstants* Style);

Put

VB.NETobject.Appearance = Style As SftPictureImageConstants
VBobject.Appearance = Style As SftPictureImageConstants
C#.NETSftPictureImageConstants object.Appearance = Style;
VC++enum SftPictureImageConstants object->Appearance = Style;
void object->PutAppearance(enum SftPictureImageConstants Style);
CHRESULT object->put_Appearance(enum SftPictureImageConstants Style);

object

A SftPictureObject object.

Style

Defines the image object using a built-in, special purpose image.

NameValueDescription
sftImageNone-1None
sftImageCheckboxNo0Checkbox - No
sftImageCheckboxYes1Checkbox - Yes
sftImageCheckboxUnknown2Checkbox - Unknown
sftImageCheckboxNoDisabled3Checkbox - No, Disabled
sftImageCheckboxYesDisabled4Checkbox - Yes, Disabled
sftImageCheckboxUnknownDisabled5Checkbox - Unknown, Disabled
sftImageRadioButtonNo6RadioButton - No
sftImageRadioButtonYes7RadioButton - Yes
sftImageRadioButtonNoDisabled8RadioButton - No, Disabled
sftImageRadioButtonYesDisabled9RadioButton - Yes, Disabled
sftImageUp10Up
sftImageUpDisabled11Up, Disabled
sftImageDown12Down
sftImageDownDisabled13Down, Disabled
sftImageSortAsc14Sort Ascending
sftImageSortAscDisabled15Sort Ascending, Disabled
sftImageSortDesc16Sort Descending
sftImageSortDescDisabled17Sort Descending, Disabled

Comments

The Appearance property defines the image object using a built-in, special purpose image.

The SftPictureObject.Type property is set to sftTypeBuiltin.

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

Examples

VB.NET

    Else
        AxSftBox1.RowColumnHeader.Image.Clear()
        AxSftBox1.get_Header(1).Image.Clear()
    End If
End Sub

Private Sub ToggleImage(ByVal Img As SftPictureObject)

    Select Case Img.Appearance
    Case SftPictureImageConstants.sftImageCheckboxNo
        Img.Appearance = SftPictureImageConstants.sftImageCheckboxYes
    Case SftPictureImageConstants.sftImageCheckboxYes
        Img.Appearance = SftPictureImageConstants.sftImageCheckboxNo
    Case SftPictureImageConstants.sftImageCheckboxUnknown
        Img.Appearance = SftPictureImageConstants.sftImageCheckboxNo
    Case SftPictureImageConstants.sftImageCheckboxNoDisabled

VB6

    Else
        SftBox1.RowColumnHeader.Image.Clear
        SftBox1.Header(1).Image.Clear
    End If

End Sub

Private Sub ToggleImage(Img As SftPictureObject)
    Select Case Img.Appearance
    Case sftImageCheckboxNo
        Img.Appearance = sftImageCheckboxYes
    Case sftImageCheckboxYes
        Img.Appearance = sftImageCheckboxNo
    Case sftImageCheckboxUnknown
        Img.Appearance = sftImageCheckboxNo
    Case sftImageCheckboxNoDisabled

C#

    } else {
        axSftBox1.RowColumnHeader.Image.Clear();
        axSftBox1.get_Header(1).Image.Clear();
    }
}

private void ToggleImage(SftPictureObject Img)
{
    switch (Img.Appearance) {
    case SftPictureImageConstants.sftImageCheckboxNo:
        Img.Appearance = SftPictureImageConstants.sftImageCheckboxYes;
        break;
    case SftPictureImageConstants.sftImageCheckboxYes:
        Img.Appearance = SftPictureImageConstants.sftImageCheckboxNo;
        break;
    case SftPictureImageConstants.sftImageCheckboxUnknown:

C++

}

void CPicturesDlg::AddBuiltinImage(LPCTSTR lpszName, SftPictureImageConstants Appearance, long Width, long Height)
{
    long ItemIndex = m_vBox->Items->Add(lpszName);
    m_vBox->Item[ItemIndex]->Level = 2;

    ISftBoxCellPtr C = m_vBox->Cell[ItemIndex][0];
    C->Image->Appearance = Appearance;
    C->Image->Width = Width;
    C->Image->Height = Height;
    C->ImageHAlign = halignSftBoxRight;
    PropagateImage(ItemIndex, C->Image);
}

void CPicturesDlg::CopyImageFromCurrentItem()

See Also SftPictureObject Object | Object Hierarchy


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