Hide

SftButton/OCX 3.0 - Button Control

Display
Print

Picture2 Property, SftButton Object

Defines the second graphic.

Deprecated - Provided for compatibility with earlier versions only - Use the Image2 property instead

Syntax

Get

VB.NETrefPictureObj = object.Picture2 As System.Drawing.Image
VBSet refPictureObj = object.Picture2 As IPictureDisp
C#.NETSystem.Drawing.Image refPictureObj = object.Picture2;
VC++IPictureDisp* refPictureObj = object->GetPicture2();
CHRESULT object->get_Picture2(IPictureDisp** refPictureObj);

Put

VB.NETobject.let_Picture2(ByVal refPictureObj As System.Drawing.Image)
VBobject.Picture2 = refPictureObj As IPictureDisp
C#.NETvoid object.let_Picture2(System.Drawing.Image refPictureObj);
VC++void object->PutPicture2(IPictureDisp* refPictureObj);
CHRESULT object->put_Picture2(IPictureDisp* refPictureObj);

PutRef

VB.NETobject.Picture2 = refPictureObj As System.Drawing.Image
VBSet object.Picture2 = refPictureObj As IPictureDisp
C#.NETSystem.Drawing.Image object.Picture2 = refPictureObj;
VC++void object->PutRefPicture2(IPictureDisp* refPictureObj);
CHRESULT object->putref_Picture2(IPictureDisp* refPictureObj);

object

A SftButton object.

refPictureObj

Defines the second graphic. Bitmaps, icons and metafiles are supported. For information about picture properties, please visit the applicable section "Using SftButton/OCX with ...".

Comments

Deprecated - Provided for compatibility with earlier versions only - Use the Image2 property instead

The Picture2 property defines the second graphic.

If the Picture object describes a bitmap, the picture uses Bitmap Transparency and the bitmap is drawn in a grayed fashion if the control is disabled (see Enabled property).

The layout of the button label and the position and alignment of the first picture component are defined using the Orientation, Image1AlignHorz and Image1AlignVert properties.

For detailed information on the use of the Orientation, Image1, Image1AlignHorz, Image1AlignVert, Image2, Image2AlignHorz, Image2AlignVert, Text, TextAlignHorz, TextAlignVert properties, please see "Button Label".

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 SftButton Object | Object Hierarchy


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