Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

NETImageObject Property, SftPictureObject Object

Defines the image object using a .NET image object (IUnknown interface).

Syntax

Get

VB.NETpUnknown = object.NETImageObject As VT_UNKNOWN
VBpUnknown = object.NETImageObject As VT_UNKNOWN
C#.NETVT_UNKNOWN pUnknown = object.NETImageObject;
VC++VT_UNKNOWN pUnknown = object->NETImageObject;
VT_UNKNOWN pUnknown = object->GetNETImageObject();
CHRESULT object->get_NETImageObject(VT_UNKNOWN* pUnknown);

PutRef

VB.NETobject.NETImageObject = pUnknown As VT_UNKNOWN
VBSet object.NETImageObject = pUnknown As VT_UNKNOWN
C#.NETVT_UNKNOWN object.NETImageObject = pUnknown;
VC++VT_UNKNOWN object->NETImageObject = pUnknown;
void object->PutRefNETImageObject(VT_UNKNOWN pUnknown);
CHRESULT object->putref_NETImageObject(VT_UNKNOWN pUnknown);

object

A SftPictureObject object.

pUnknown

Defines the image object using a .NET image object (IUnknown interface).

Comments

The NETImageObject property defines the image object using a .NET image object (IUnknown 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 sftTypeGDIPlus. The SftPictureObject.ActualHeight and SftPictureObject.ActualWidth properties reflect the image size.

Use of this property requires the SftHelperComponent component, which is added to each project (see "Using SftTree/OCX with .NET").

Examples

VB.NET

        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.Image.NETImageObject = Img
        C.ImageHAlign = Align
        PropagateImage(ItemIndex, C.Image)
    End Sub

    Private Sub UpdateImageList(ByVal ItemIndex As Integer, ByVal ImageListControl As ImageList, ByVal i As Integer, ByVal Align As SftTreeHAlignConstants)
        Dim C As SftTreeCell
        C = AxSftTree1.get_Cell(ItemIndex, 0)

C#

            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);
            C.Image.NETImageObject = img;
            C.ImageHAlign = Align;
            PropagateImage(ItemIndex, C.Image);
        }

        private void UpdateImageList(int ItemIndex, ImageList ImageListControl, int i, SftTreeHAlignConstants Align)
        {
            SftTreeCell C = axSftTree1.get_Cell(ItemIndex, 0);

See Also SftPictureObject Object | Object Hierarchy


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