Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

Appearance Property, SftPictureObject Object

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
            AxSftTree1.RowColumnHeader.Image.Clear()
            AxSftTree1.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
        SftTree1.RowColumnHeader.Image.Clear
        SftTree1.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 {
                axSftTree1.RowColumnHeader.Image.Clear();
                axSftTree1.get_Header(1).Image.Clear();
            }
        }

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

C++

}

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

    ISftTreeCellPtr C = m_vTree->Cell[ItemIndex][0];
    C->Image->Appearance = Appearance;
    C->Image->Width = Width;
    C->Image->Height = Height;
    C->ImageHAlign = halignSftTreeRight;
    PropagateImage(ItemIndex, C->Image);
}

void CPicturesDlg::CopyImageFromCurrentItem()

See Also SftPictureObject Object | Object Hierarchy


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