Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

Picture Property, SftPictureObject Object

Defines the image object using an OLE Picture object (IPictureDisp interface).

Syntax

Get

VB.NETpPictureDisp = object.Picture As stdole.IPictureDisp
VBSet pPictureDisp = object.Picture As IPictureDisp
C#.NETstdole.IPictureDisp pPictureDisp = object.Picture;
VC++IPictureDisp* pPictureDisp = object->GetPicture();
CHRESULT object->get_Picture(IPictureDisp** pPictureDisp);

Put

VB.NETobject.let_Picture(ByVal pPictureDisp As stdole.IPictureDisp)
VBobject.Picture = pPictureDisp As IPictureDisp
C#.NETvoid object.let_Picture(stdole.IPictureDisp pPictureDisp);
VC++void object->PutPicture(IPictureDisp* pPictureDisp);
CHRESULT object->put_Picture(IPictureDisp* pPictureDisp);

PutRef

VB.NETobject.Picture = pPictureDisp As stdole.IPictureDisp
VBSet object.Picture = pPictureDisp As IPictureDisp
C#.NETstdole.IPictureDisp object.Picture = pPictureDisp;
VC++void object->PutRefPicture(IPictureDisp* pPictureDisp);
CHRESULT object->putref_Picture(IPictureDisp* pPictureDisp);

object

A SftPictureObject object.

pPictureDisp

Defines the image object using an OLE Picture object (IPictureDisp interface). For information about picture properties, please visit the applicable section "Using SftTree/OCX with ...".

Comments

The Picture property defines the image object using an OLE Picture object (IPictureDisp interface).

Typically, .NET applications use the NETImageObject property to define an image, C and C++ applications use BitmapHandle or Image, VB6 and other COM applications use the Picture property.

The SftPictureObject.Type property is set to sftTypeIDispatch. The SftPictureObject.ActualHeight and SftPictureObject.ActualWidth properties reflect the image size.

Examples

VB.NET

            AxSftTree1.get_Item(ItemIndex).LabelImage = Img
            AxSftTree1.get_Item(ItemIndex).RowHeader.Image = Img
        End If
    End Sub

    Private Sub UpdatePictures(ByVal ItemIndex As Integer, ByVal IPic As stdole.IPictureDisp, ByVal Align As SftTreeHAlignConstants)
        Dim C As SftTreeCell
        C = AxSftTree1.get_Cell(ItemIndex, 0)
        C.Image.Picture = IPic
        C.ImageHAlign = Align
        PropagateImage(ItemIndex, C.Image)
    End Sub

    Private Sub UpdateImages(ByVal ItemIndex As Integer, ByVal Img As Image, ByVal Align As SftTreeHAlignConstants)
        Dim C As SftTreeCell
        C = AxSftTree1.get_Cell(ItemIndex, 0)

VB6

        SftTree1.Item(ItemIndex).LabelImage = Img
        SftTree1.Item(ItemIndex).RowHeader.Image = Img
    End If
End Sub

Private Sub UpdatePictures(ByVal ItemIndex As Integer, ByVal Pic As StdPicture, ByVal Align As SftTreeHAlignConstants)
    Dim C As SftTreeCell
    Set C = SftTree1.Cell(ItemIndex, 0)
    Set C.Image.Picture = Pic
    C.ImageHAlign = Align
    PropagateImage ItemIndex, C.Image
End Sub

Private Sub UpdateImages(ByVal ItemIndex As Integer, ByVal Pic As LONG_PTR, ByVal Align As SftTreeHAlignConstants)
    Dim C As SftTreeCell
    Set C = SftTree1.Cell(ItemIndex, 0)

C#

                axSftTree1.get_Item(ItemIndex).LabelImage = Img;
                axSftTree1.get_Item(ItemIndex).RowHeader.Image = Img;
            }
        }

        private void UpdatePictures(int ItemIndex, stdole.IPictureDisp IPic, SftTreeHAlignConstants Align)
        {
            SftTreeCell C = axSftTree1.get_Cell(ItemIndex, 0);
            C.Image.Picture = IPic;
            C.ImageHAlign = Align;
            PropagateImage(ItemIndex, C.Image);
        }

        private void UpdateImages(int ItemIndex, Image img, SftTreeHAlignConstants Align)
        {
            SftTreeCell C = axSftTree1.get_Cell(ItemIndex, 0);

See Also SftPictureObject Object | Object Hierarchy


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


Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.