Hide

SftButton/OCX 3.0 - Button Control

Display
Print

Picture1 Property, SftButton Object

Defines the first graphic.

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

Syntax

Get

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

Put

VB.NETobject.let_Picture1(ByVal refPictureObj As System.Drawing.Image)
VBobject.Picture1 = refPictureObj As IPictureDisp
C#.NETvoid object.let_Picture1(System.Drawing.Image refPictureObj);
VC++void object->PutPicture1(IPictureDisp* refPictureObj);
CHRESULT object->put_Picture1(IPictureDisp* refPictureObj);

PutRef

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

object

A SftButton object.

refPictureObj

Defines the first 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 Image1 property instead

The Picture1 property defines the first 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.