SftTree/OCX 7.0

SftTree.BackgroundPicture Property

Softel vdm, Inc.

Defines the graphic displayed as the control's background.

Syntax       

Get

VB.NET

refPictureObj = object.BackgroundPicture  As System.Drawing.ImageLanguage-specific information

VB

Set refPictureObj = object.BackgroundPicture  As IPictureDisp

C#.NET

System.Drawing.ImageLanguage-specific information refPictureObj = object.BackgroundPicture;

VC++

IPictureDisp* refPictureObj = object->GetBackgroundPicture();

C

HRESULT object->get_BackgroundPicture(IPictureDisp** refPictureObj);

Delphi

refPictureObj := object.BackgroundPicture  : TPicture;

Put

VB.NET

object.let_BackgroundPicture(ByVal refPictureObj As System.Drawing.ImageLanguage-specific information)

VB

object.BackgroundPicture = refPictureObj  As IPictureDisp

C#.NET

void object.let_BackgroundPicture(System.Drawing.ImageLanguage-specific information refPictureObj);

VC++

void object->PutBackgroundPicture(IPictureDisp* refPictureObj);

C

HRESULT object->put_BackgroundPicture(IPictureDisp* refPictureObj);

Delphi

procedure object._Set_BackgroundPicture(refPictureObj : TPicture);

PutRef

VB.NET

object.BackgroundPicture = refPictureObj  As System.Drawing.ImageLanguage-specific information

VB

Set object.BackgroundPicture = refPictureObj  As IPictureDisp

C#.NET

System.Drawing.ImageLanguage-specific information object.BackgroundPicture = refPictureObj;

VC++

void object->PutRefBackgroundPicture(IPictureDisp* refPictureObj);

C

HRESULT object->putref_BackgroundPicture(IPictureDisp* refPictureObj);

Delphi

object.BackgroundPicture := refPictureObj  : TPicture;

object

A SftTree object.

refPictureObj

A Picture object.  This Picture object contains the graphic used as the control's background.  The refPictureObj object must represent a bitmap and cannot represent an icon or a metafile.  For information about picture properties, please visit the applicable section "Using SftTree/OCX with ...".

Comments

The BackgroundPicture property defines the graphic displayed as the control's background.

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

If the Background property defines a valid bitmap, this bitmap is displayed as the tree control's background.  If the background bitmap is too small to fill the entire client area of the tree control, it is tiled.  The properties BackgroundX and BackgroundY can be used to define an offset with which the bitmap should be aligned.  The background bitmap is aligned with the top, left edge of the tree control window (not the client area) if 0 is specified.

The BackgroundStyle property defines whether the bitmap is centered or should be scrolled horizontally when the tree control contents are scrolled horizontally.

The row header area, row/column header area and column header do not display the background bitmap.  These areas are not transparent.

There is no default background bitmapBitmap transparency is not used for the background bitmap.

If a background bitmap is used, the background colors defined for the tree control, columns and cells should be set to the default values, so these do not interfere with the background bitmap.

When using RightToLeft for right-to-left reading support, the bitmap origin is the top, right corner of the tree control window.  The properties BackgroundX and BackgroundY specify offsets relative to the top, right edge of the tree control window.  In this case, the bitmap is also tiled right to left. 

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