SftTree/OCX 7.0

SftTree.ColumnPicture Property

Softel vdm, Inc.

Defines the graphic displayed in the specified column header.

Deprecated - Provided for compatibility with earlier versions only - Use Header.Image.Picture instead

Syntax       

Get

VB.NET

refPictureObj = object.get_ColumnPicture(ByVal ColIndex As Short)  As System.Drawing.ImageLanguage-specific information

VB

Set refPictureObj = object.ColumnPicture(ByVal ColIndex As Integer)  As IPictureDisp

C#.NET

System.Drawing.ImageLanguage-specific information refPictureObj = object.get_ColumnPicture(short ColIndex);

VC++

IPictureDisp* refPictureObj = object->GetColumnPicture(short ColIndex);

C

HRESULT object->get_ColumnPicture(short ColIndex, IPictureDisp** refPictureObj);

Delphi

refPictureObj := object.ColumnPicture[ColIndex : Smallint]  : TPicture;

Put

VB.NET

object.let_ColumnPicture(ByVal ColIndex As Short, ByVal refPictureObj As System.Drawing.ImageLanguage-specific information)

VB

object.ColumnPicture(ByVal ColIndex As Integer) = refPictureObj  As IPictureDisp

C#.NET

void object.let_ColumnPicture(short ColIndex, System.Drawing.ImageLanguage-specific information refPictureObj);

VC++

void object->PutColumnPicture(short ColIndex, IPictureDisp* refPictureObj);

C

HRESULT object->put_ColumnPicture(short ColIndex, IPictureDisp* refPictureObj);

Delphi

procedure object._Set_ColumnPicture(ColIndex : Smallint, refPictureObj : TPicture);

PutRef

VB.NET

object.set_ColumnPicture(ByVal ColIndex As Short, ByVal refPictureObj As System.Drawing.ImageLanguage-specific information)

VB

Set object.ColumnPicture(ByVal ColIndex As Integer) = refPictureObj  As IPictureDisp

C#.NET

void object.set_ColumnPicture(short ColIndex, System.Drawing.ImageLanguage-specific information refPictureObj);

VC++

void object->PutRefColumnPicture(short ColIndex, IPictureDisp* refPictureObj);

C

HRESULT object->putref_ColumnPicture(short ColIndex, IPictureDisp* refPictureObj);

Delphi

object.ColumnPicture[ColIndex : Smallint] := refPictureObj  : TPicture;

object

A SftTree object.

ColIndex

The zero-based column number.

refPictureObj

Defines the graphic displayed in the specified column header.  The refPictureObj object must represent a bitmap, icon or Windows metafile.  If a bitmap is used, the top, left pixel of each graphic must contain the background color.  This color will be replaced by the actual background when the graphic is displayed.  For information about picture properties, please visit the applicable section "Using SftTree/OCX with ...".

Comments

Deprecated - Provided for compatibility with earlier versions only - Use Header.Image.Picture instead

The ColumnPicture property defines the graphic displayed in the specified column header.

The ColumnPicture and ColumnPictureH properties are synonyms, but accept different value types (Picture object reference or Windows bitmap handle).

All graphics used in a tree control as ColumnPicture or Header.Image property at the same time must be the same size (height and width).  The dimensions of the graphics are used to calculate the minimum dimension for the column headers, so graphics used as ColumnPicture or Header.Image property are never clipped vertically.  To change the column header graphic size, all column header graphics must be removed first by setting the ColumnPicture and Header.Image properties to Nothing (NULL) for each column before assigning new column header graphics.

If a column header is disabled (see Header.Enabled property), the graphic is drawn in a "grayed" fashion, if it is based on a bitmap. Other image types, like color samples, .NET image objects, etc., must be explicitly replaced with a grayed image if a different rendering of a disabled image is desired.

The ColumnPicture property can be set to the value Nothing (NULL), which removes the graphic from the column header.

The position of the column header graphic is determined by the Header.ImageHAlign, Header.ImageVAlign and Header.TextHAlign properties.

Using PutRef (see Syntax above) the control will use the reference to the Picture object.  If the Picture object is later changed, this will also affect the image used by the control.  Using Put instead causes the control to create a copy of the Picture object.  If the Picture object is later changed, this will not affect the image used by the control as it uses a copy of the object.  Because of the additional overhead and the increased resource use of Put, PutRef is the preferred method.

See Also  SftTree Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com