HeaderPane
Main
Hide
Share Link
Print

Picture Property, SftPictureObject Object

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

Syntax

Get

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

Put

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

PutRef

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

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

C# View entire sample code

                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);

VB.NET View entire sample code

            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)

C++ View entire sample code

    m_vTree->Cell[i][0]->ProgressColor = RGB(128,128,0);
    m_vTree->Cell[i][0]->ProgressColorEnd = RGB(255,255,0);
    m_vTree->Cell[i][0]->ProgressMax = 150;   // maximum value 0-150
    m_vTree->Cell[i][0]->ProgressValue = 40; // current value
    m_vTree->Cell[i][0]->BackColor = 0x80000000L | COLOR_WINDOW;
    m_vTree->Cell[i][0]->BackColorEnd = RGB(255, 0, 0);
    m_vTree->Cell[i][0]->BackColorOrientation = horizontalDefaultOrientationSftTree;

    ItemIndex = m_vTree->Items->Add("Supported Picture Types");

    m_vTree->Cell[ItemIndex][1]->Text = _T("SftTree/OCX supports numerous image types, such as GDI+, bitmaps, icons, ImageLists and also offers numerous built-in images.");

    // add GDI+ samples

    ItemIndex = m_vTree->Items->Add(_T("GDI+ Images"));
    m_vTree->Item[ItemIndex]->Level = 1;

VB6 View entire sample code

        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)

See Also SftPictureObject Object | Object Hierarchy


Last Updated 11/03/2026 - (email)
© 2026 Softel vdm, Inc.