Spread Windows Forms 6.0 Product Documentation
Picture Property
See Also  Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > ElementControl Class : Picture Property


Glossary Item Box

Gets or sets the picture for the control.

Syntax

Visual Basic (Declaration) 
Public Overridable Property Picture As Image
Visual Basic (Usage)Copy Code
Dim instance As ElementControl
Dim value As Image
 
instance.Picture = value
 
value = instance.Picture
C# 
public virtual Image Picture {get; set;}

Property Value

Image object containing the picture

Remarks

Controls can display pictures in layers. The first layer consists of a foreground picture, next comes the content of the control, such as text and a picture, then comes the background picture, and finally, the background of the control, which displays the background color.

Set this property to specify the picture for the content layer.

For more information, see the Image class in the Microsoft .NET Framework Reference.

Set the ForegroundImage property to specify the foreground picture layer. Set the BackgroundImage property to specify the background picture layer.

Specify the alignment for the contents in a control using the AlignHorz and AlignVert properties.

You can work with the positioning of the picture by setting the MarginTop, MarginBottom, MarginLeft, and MarginRight properties. These properties leave space between the edge of the picture and the edges of the control.

You can also set the PictureMargin property to specify the margin to use between the picture and the text in the control.

Specify the orientation of the picture by setting the PictureOrientation property.

You can use the various pictures' transparency colors to display portions of the underlying content and other pictures in the control. For the picture layer, set the PictureTransparencyColor property.

Note: If the computer is in 256-color mode and the control displays a picture and a foreground picture that have different palettes, the palette for the foreground picture will override the palette for the picture.

If the application changes the picture, the PictureChanged event occurs.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.