Spread Windows Forms 11.0 Product Documentation
PictureDown Property (ButtonCellType)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > ButtonCellType Class : PictureDown Property
Gets or sets the image for the down state of the button.
Syntax
'Declaration
 
Public Property PictureDown As Image
'Usage
 
Dim instance As ButtonCellType
Dim value As Image
 
instance.PictureDown = value
 
value = instance.PictureDown
public Image PictureDown {get; set;}

Property Value

Image object containing the picture for the button when the button is pressed
Remarks

If you set the TwoState property to true, you can set a different image for each of the two states of the button. Use this property to set the image for the button when it is pressed. Use the Picture property to set the image for the button when it is not pressed.

Tip: When using custom images to represent states, try to create a consistent look and feel. Also, be aware of common interface conventions used to represent states.
Example
This example sets up a cell in the first sheet as a two-state button cell (so each time the user clicks on it, it toggles) with the Picture image displayed in one state and PictureDown image displayed in the other state. The text is displayed above the image in the button.
FarPoint.Win.Spread.CellType.ButtonCellType butncell = new FarPoint.Win.Spread.CellType.ButtonCellType();
butncell.TwoState = true;
Image upimage;
Image dnimage;
upimage = Image.FromFile("..\\images\\up.jpg");
dnimage = Image.FromFile("..\\images\\down.jpg");
butncell.Picture = upimage;
butncell.PictureDown = dnimage;
butncell.TextAlign = FarPoint.Win.ButtonTextAlign.TextTopPictBottom;
butncell.Text = "Now up - Click";
butncell.TextDown ="Now down - Click";
fpSpread1.Sheets[0].Cells[4,2].CellType = butncell;
Dim butncell As New FarPoint.Win.Spread.CellType.ButtonCellType()
butncell.TwoState = True
Dim upimage As Image
Dim dnimage As Image
butncell.Picture = upimage.FromFile("..\images\up.jpg")
butncell.PictureDown = dnimage.FromFile("..\images\down.jpg")
butncell.TextAlign = FarPoint.Win.ButtonTextAlign.TextTopPictBottom
butncell.Text = "Now up - Click"
butncell.TextDown ="Now down - Click"
fpSpread1.Sheets(0).Cells(4,2).CellType = butncell
See Also

Reference

ButtonCellType Class
ButtonCellType Members
Picture Property
TwoState Property